Brian Gerst
5e2aad2460
x86/compat: Remove unneeded #include
...
Including sys_ia32.h is not needed in signal.c.
Signed-off-by: Brian Gerst <brgerst@gmail.com >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/1434974121-32575-10-git-send-email-brgerst@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:28:57 +02:00
Brian Gerst
10ed34935e
x86/compat, x86/perf: Don't build perf_callchain_user32() on x32
...
perf_callchain_user32() is not needed for x32.
Signed-off-by: Brian Gerst <brgerst@gmail.com >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/1434974121-32575-9-git-send-email-brgerst@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:28:57 +02:00
Brian Gerst
c338867d0e
x86/compat: Check for both 32-bit compat and x32 in get_gate_vma()
...
Change this to CONFIG_COMPAT so both 32-bit compat and x32 will
do the check.
Signed-off-by: Brian Gerst <brgerst@gmail.com >
Acked-by: Andy Lutomirski <luto@kernel.org >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/1434974121-32575-8-git-send-email-brgerst@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:28:57 +02:00
Brian Gerst
ab8b82ee6d
x86/compat: Don't build the 32-bit VDSO if not needed
...
Build the 32-bit vdso only for native 32-bit or 32-bit compat is
enabled. x32 should not force it to build.
Signed-off-by: Brian Gerst <brgerst@gmail.com >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/1434974121-32575-7-git-send-email-brgerst@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:28:56 +02:00
Brian Gerst
601275c3e0
x86/compat: Factor out ia32 compat code from compat_arch_ptrace()
...
Move the ia32-specific code in compat_arch_ptrace() into its
own function.
Signed-off-by: Brian Gerst <brgerst@gmail.com >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/1434974121-32575-6-git-send-email-brgerst@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:28:56 +02:00
Brian Gerst
7da770785f
x86/compat: Rename 'start_thread_ia32' to 'compat_start_thread'
...
This function is shared between the 32-bit compat and x32 ABIs.
Signed-off-by: Brian Gerst <brgerst@gmail.com >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/1434974121-32575-5-git-send-email-brgerst@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:28:56 +02:00
Brian Gerst
b829d1be20
x86/compat: Move ucontext_x32 to sigframe.h
...
ia32.h should only contain the code for 32-bit compatability.
Signed-off-by: Brian Gerst <brgerst@gmail.com >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/1434974121-32575-4-git-send-email-brgerst@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:28:55 +02:00
Brian Gerst
b2e02b820d
x86/compat: Make mmap_is_ia32() common compat
...
TIF_ADDR32 is set for both ia32 and x32 tasks, so change from
CONFIG_IA32_EMULATION to CONFIG_COMPAT. Use config_enabled()
to make the function more readable.
Signed-off-by: Brian Gerst <brgerst@gmail.com >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/1434974121-32575-3-git-send-email-brgerst@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:28:55 +02:00
Brian Gerst
c0bfd26e13
x86/compat: Move copy_siginfo_*_user32() to signal_compat.c
...
copy_siginfo_to_user32() and copy_siginfo_from_user32() are used
by both the 32-bit compat and x32 ABIs. Move them to
signal_compat.c.
Signed-off-by: Brian Gerst <brgerst@gmail.com >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/1434974121-32575-2-git-send-email-brgerst@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:28:55 +02:00
George Spelvin
5a33fcb8d9
x86/asm/tsc: Save an instruction in DECLARE_ARGS users
...
Before, the code to do RDTSC looked like:
rdtsc
shl $0x20, %rdx
mov %eax, %eax
or %rdx, %rax
The "mov %eax, %eax" is required to clear the high 32 bits of RAX.
By declaring low and high as 64-bit variables, the code is
simplified to:
rdtsc
shl $0x20,%rdx
or %rdx,%rax
Yes, it's a 2-byte instruction that's not on a critical path,
but there are principles to be upheld.
Every user of EAX_EDX_RET has been checked. I tried to check
users of EAX_EDX_ARGS, but there weren't any, so I deleted it to
be safe.
( There's no benefit to making "high" 64 bits, but it was the
simplest way to proceed. )
Signed-off-by: George Spelvin <linux@horizon.com >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: jacob.jun.pan@linux.intel.com
Link: http://lkml.kernel.org/r/20150618075906.4615.qmail@ns.horizon.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:23:30 +02:00
Andy Lutomirski
bb8dd96032
x86/asm/tsc: Remove rdtsc_barrier()
...
All callers have been converted to rdtsc_ordered().
Signed-off-by: Andy Lutomirski <luto@kernel.org >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Huang Rui <ray.huang@amd.com >
Cc: John Stultz <john.stultz@linaro.org >
Cc: Len Brown <lenb@kernel.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Richard Weinberger <richard@nod.at >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: kvm ML <kvm@vger.kernel.org >
Link: http://lkml.kernel.org/r/9baa4ae9a1e7c7c282f9cb2f15bb6bf5c2004032.1434501121.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:23:30 +02:00
Andy Lutomirski
502dfeff23
x86/asm/tsc, x86/kvm: Drop open-coded barrier and use rdtsc_ordered() in kvmclock
...
__pvclock_read_cycles() used to have two barriers, one of which was unnecessary,
which got removed after an initial version of this patch was sent.
But the barrier is still open-coded unnecessarily - get rid of
that barrier and clean up the code by just using rdtsc_ordered().
Signed-off-by: Andy Lutomirski <luto@kernel.org >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Huang Rui <ray.huang@amd.com >
Cc: John Stultz <john.stultz@linaro.org >
Cc: Len Brown <lenb@kernel.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Marcelo Tosatti <mtosatti@redhat.com >
Cc: Paolo Bonzini <pbonzini@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Radim Krcmar <rkrcmar@redhat.com >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: kvm ML <kvm@vger.kernel.org >
Link: http://lkml.kernel.org/r/678981cc4761fb38a793c217c9cac42503cf3719.1434501121.git.luto@kernel.org
[ Ported it to v4.2-rc1. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:23:30 +02:00
Andy Lutomirski
27c634054a
x86/asm/tsc: Use rdtsc_ordered() in read_tsc() instead of get_cycles()
...
There are two logical changes here. First, this removes a check
for cpu_has_tsc. That check is unnecessary, as we don't
register the TSC as a clocksource on systems that have no TSC.
Second, it adds a barrier, thus preventing observable
non-monotonicity.
I suspect that the missing barrier was never a problem in
practice because system calls themselves were heavy enough
barriers to prevent user code from observing time warps due to
speculation. (Without the corresponding barrier in the vDSO,
however, non-monotonicity is easy to detect.)
Signed-off-by: Andy Lutomirski <luto@kernel.org >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Huang Rui <ray.huang@amd.com >
Cc: John Stultz <john.stultz@linaro.org >
Cc: Len Brown <lenb@kernel.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: kvm ML <kvm@vger.kernel.org >
Link: http://lkml.kernel.org/r/c6ff621a053127a65b70f175443578db7a0711be.1434501121.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:23:29 +02:00
Andy Lutomirski
eee6946e44
x86/asm/tsc/sync: Use rdtsc_ordered() in check_tsc_warp() and drop extra barriers
...
Using get_cycles was unnecessary: check_tsc_warp() is not called
on TSC-less systems. Replace rdtsc_barrier(); get_cycles() with
rdtsc_ordered().
While we're at it, make the somewhat more dangerous change of
removing barrier_before_rdtsc after RDTSC in the TSC warp check
code. This should be okay, though -- the vDSO TSC code doesn't
have that barrier, so, if removing the barrier from the warp
check would cause us to detect a warp that we otherwise wouldn't
detect, then we have a genuine bug.
Signed-off-by: Andy Lutomirski <luto@kernel.org >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Huang Rui <ray.huang@amd.com >
Cc: John Stultz <john.stultz@linaro.org >
Cc: Len Brown <lenb@kernel.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: kvm ML <kvm@vger.kernel.org >
Link: http://lkml.kernel.org/r/387c4c3a75f875bcde6cd68cee013273a744f364.1434501121.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:23:29 +02:00
Andy Lutomirski
03b9730b76
x86/asm/tsc: Add rdtsc_ordered() and use it in trivial call sites
...
rdtsc_barrier(); rdtsc() is an unnecessary mouthful and requires
more thought than should be necessary. Add an rdtsc_ordered()
helper and replace the trivial call sites with it.
This should not change generated code. The duplication of the
fence asm is temporary.
Signed-off-by: Andy Lutomirski <luto@kernel.org >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Huang Rui <ray.huang@amd.com >
Cc: John Stultz <john.stultz@linaro.org >
Cc: Len Brown <lenb@kernel.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: kvm ML <kvm@vger.kernel.org >
Link: http://lkml.kernel.org/r/dddbf98a2af53312e9aa73a5a2b1622fe5d6f52b.1434501121.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:23:29 +02:00
Andy Lutomirski
4ea1636b04
x86/asm/tsc: Rename native_read_tsc() to rdtsc()
...
Now that there is no paravirt TSC, the "native" is
inappropriate. The function does RDTSC, so give it the obvious
name: rdtsc().
Suggested-by: Borislav Petkov <bp@suse.de >
Signed-off-by: Andy Lutomirski <luto@kernel.org >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Huang Rui <ray.huang@amd.com >
Cc: John Stultz <john.stultz@linaro.org >
Cc: Len Brown <lenb@kernel.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: kvm ML <kvm@vger.kernel.org >
Link: http://lkml.kernel.org/r/fd43e16281991f096c1e4d21574d9e1402c62d39.1434501121.git.luto@kernel.org
[ Ported it to v4.2-rc1. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:23:28 +02:00
Andy Lutomirski
fe47ae6e1a
x86/asm/tsc: Remove rdtscl()
...
It has no more callers, and it was never a very sensible
interface to begin with. Users of the TSC should either read all
64 bits or explicitly throw out the high bits.
Signed-off-by: Andy Lutomirski <luto@kernel.org >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Huang Rui <ray.huang@amd.com >
Cc: John Stultz <john.stultz@linaro.org >
Cc: Len Brown <lenb@kernel.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: kvm ML <kvm@vger.kernel.org >
Link: http://lkml.kernel.org/r/250105f7cee519be9d7fc4464b5784caafc8f4fe.1434501121.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:23:28 +02:00
Andy Lutomirski
3796366614
x86/asm/tsc, x86/cpu/amd: Use the full 64-bit TSC to detect the 2.6.2 bug
...
This code is timing 100k indirect calls, so the added overhead
of counting the number of cycles elapsed as a 64-bit number
should be insignificant. Drop the optimization of using a
32-bit count.
Signed-off-by: Andy Lutomirski <luto@kernel.org >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Huang Rui <ray.huang@amd.com >
Cc: John Stultz <john.stultz@linaro.org >
Cc: Len Brown <lenb@kernel.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: kvm ML <kvm@vger.kernel.org >
Link: http://lkml.kernel.org/r/d58f339a9c0dd8352b50d2f7a216f67ec2844f20.1434501121.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:23:27 +02:00
Andy Lutomirski
9cfa1a0279
x86/asm/tsc: Use the full 64-bit TSC in delay_tsc()
...
As a very minor optimization, delay_tsc() was only using the low
32 bits of the TSC. It's a delay function, so just use the whole
thing.
Signed-off-by: Andy Lutomirski <luto@kernel.org >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Huang Rui <ray.huang@amd.com >
Cc: John Stultz <john.stultz@linaro.org >
Cc: Len Brown <lenb@kernel.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: kvm ML <kvm@vger.kernel.org >
Link: http://lkml.kernel.org/r/bd1a277c71321b67c4794970cb5ace05efe21ab6.1434501121.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:23:27 +02:00
Andy Lutomirski
ec69de52c6
x86/asm/tsc: Remove the rdtscp() and rdtscpll() macros
...
They have no users. Leave native_read_tscp() which seems
potentially useful despite also having no callers.
Signed-off-by: Andy Lutomirski <luto@kernel.org >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Huang Rui <ray.huang@amd.com >
Cc: John Stultz <john.stultz@linaro.org >
Cc: Len Brown <lenb@kernel.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: kvm ML <kvm@vger.kernel.org >
Link: http://lkml.kernel.org/r/6abfa3ef80534b5d73898a48c4d25e069303cbe5.1434501121.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:23:26 +02:00
Andy Lutomirski
87be28aaf1
x86/asm/tsc: Replace rdtscll() with native_read_tsc()
...
Now that the ->read_tsc() paravirt hook is gone, rdtscll() is
just a wrapper around native_read_tsc(). Unwrap it.
Signed-off-by: Andy Lutomirski <luto@kernel.org >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Huang Rui <ray.huang@amd.com >
Cc: John Stultz <john.stultz@linaro.org >
Cc: Len Brown <lenb@kernel.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: kvm ML <kvm@vger.kernel.org >
Link: http://lkml.kernel.org/r/d2449ae62c1b1fb90195bcfb19ef4a35883a04dc.1434501121.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:23:26 +02:00
Andy Lutomirski
9261e050b6
x86/asm/tsc, x86/paravirt: Remove read_tsc() and read_tscp() paravirt hooks
...
We've had ->read_tsc() and ->read_tscp() paravirt hooks since
the very beginning of paravirt, i.e.,
d3561b7fa0 ("[PATCH] paravirt: header and stubs for paravirtualisation").
AFAICT, the only paravirt guest implementation that ever
replaced these calls was vmware, and it's gone. Arguably even
vmware shouldn't have hooked RDTSC -- we fully support systems
that don't have a TSC at all, so there's no point for a paravirt
implementation to pretend that we have a TSC but to replace it.
I also doubt that these hooks actually worked. Calls to rdtscl()
and rdtscll(), which respected the hooks, were used seemingly
interchangeably with native_read_tsc(), which did not.
Just remove them. If anyone ever needs them again, they can try
to make a case for why they need them.
Before, on a paravirt config:
text data bss dec hex filename
12618257 1816384 1093632 15528273 ecf151 vmlinux
After:
text data bss dec hex filename
12617207 1816384 1093632 15527223 eced37 vmlinux
Signed-off-by: Andy Lutomirski <luto@kernel.org >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Huang Rui <ray.huang@amd.com >
Cc: John Stultz <john.stultz@linaro.org >
Cc: Len Brown <lenb@kernel.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: kvm ML <kvm@vger.kernel.org >
Cc: virtualization@lists.linux-foundation.org
Link: http://lkml.kernel.org/r/d08a2600fb298af163681e5efd8e599d889a5b97.1434501121.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:23:26 +02:00
Andy Lutomirski
881d7bf843
x86/asm/tsc, kvm: Remove vget_cycles()
...
The only caller was KVM's read_tsc(). The only difference
between vget_cycles() and native_read_tsc() was that
vget_cycles() returned zero instead of crashing on TSC-less
systems. KVM already checks vclock_mode() before calling that
function, so the extra check is unnecessary. Also, KVM
(host-side) requires the TSC to exist.
Signed-off-by: Andy Lutomirski <luto@kernel.org >
Signed-off-by: Borislav Petkov <bp@suse.de >
Acked-by: Paolo Bonzini <pbonzini@redhat.com >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Huang Rui <ray.huang@amd.com >
Cc: John Stultz <john.stultz@linaro.org >
Cc: Len Brown <lenb@kernel.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: kvm ML <kvm@vger.kernel.org >
Link: http://lkml.kernel.org/r/20615df14ae2eb713ea7a5f5123c1dc4c7ca993d.1434501121.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:23:25 +02:00
Andy Lutomirski
c6e5ca35c4
x86/asm/tsc: Inline native_read_tsc() and remove __native_read_tsc()
...
In the following commit:
cdc7957d19 ("x86: move native_read_tsc() offline")
... native_read_tsc() was moved out of line, presumably for some
now-obsolete vDSO-related reason. Undo it.
The entire rdtsc, shl, or sequence is only 11 bytes, and calls
via rdtscl() and similar helpers were already inlined.
Signed-off-by: Andy Lutomirski <luto@kernel.org >
Signed-off-by: Borislav Petkov <bp@suse.de >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Brian Gerst <brgerst@gmail.com >
Cc: Denys Vlasenko <dvlasenk@redhat.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Huang Rui <ray.huang@amd.com >
Cc: John Stultz <john.stultz@linaro.org >
Cc: Len Brown <lenb@kernel.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Ralf Baechle <ralf@linux-mips.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: kvm ML <kvm@vger.kernel.org >
Link: http://lkml.kernel.org/r/d05ffe2aaf8468ca475ebc00efad7b2fa174af19.1434501121.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:23:25 +02:00
Zhu Guihua
20d5e4a9cd
x86/espfix: Init espfix on the boot CPU side
...
As we alloc pages with GFP_KERNEL in init_espfix_ap() which is
called before we enable local irqs, so the lockdep sub-system
would (correctly) trigger a warning about the potentially
blocking API.
So we allocate them on the boot CPU side when the secondary CPU is
brought up by the boot CPU, and hand them over to the secondary
CPU.
And we use alloc_pages_node() with the secondary CPU's node, to
make sure the espfix stack is NUMA-local to the CPU that is
going to use it.
Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com >
Cc: <bp@alien8.de >
Cc: <luto@amacapital.net >
Cc: <luto@kernel.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/c97add2670e9abebb90095369f0cfc172373ac94.1435824469.git.zhugh.fnst@cn.fujitsu.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:00:34 +02:00
Zhu Guihua
1db875631f
x86/espfix: Add 'cpu' parameter to init_espfix_ap()
...
Add a CPU index parameter to init_espfix_ap(), so that the
parameter could be propagated to the function for espfix
page allocation.
Signed-off-by: Zhu Guihua <zhugh.fnst@cn.fujitsu.com >
Cc: <bp@alien8.de >
Cc: <luto@amacapital.net >
Cc: <luto@kernel.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/cde3fcf1b3211f3f03feb1a995bce3fee850f0fc.1435824469.git.zhugh.fnst@cn.fujitsu.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 15:00:33 +02:00
Denys Vlasenko
c73e36b775
x86/asm/entry/32: Replace RESTORE_RSI_RDI with open-coded 32-bit reads
...
This doesn't change much, but uses shorter 32-bit insns:
-48 8b 74 24 68 mov 0x68(%rsp),%rsi
-48 8b 7c 24 70 mov 0x70(%rsp),%rdi
-48 8b 54 24 60 mov 0x60(%rsp),%rdx
+8b 54 24 60 mov 0x60(%rsp),%edx
+8b 74 24 68 mov 0x68(%rsp),%esi
+8b 7c 24 70 mov 0x70(%rsp),%edi
and does the loads in pt_regs order.
Since these are the only uses of RESTORE_RSI_RDI[_RDX], drop
these macros.
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com >
Cc: Alexei Starovoitov <ast@plumgrid.com >
Cc: Andy Lutomirski <luto@amacapital.net >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Frederic Weisbecker <fweisbec@gmail.com >
Cc: H. Peter Anvin <hpa@zytor.com >
Cc: Kees Cook <keescook@chromium.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Oleg Nesterov <oleg@redhat.com >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Steven Rostedt <rostedt@goodmis.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Will Drewry <wad@chromium.org >
Link: http://lkml.kernel.org/r/1435954742-2545-1-git-send-email-dvlasenk@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 14:56:50 +02:00
Andrey Ryabinin
d6f2d75a7a
x86/kasan: Move KASAN_SHADOW_OFFSET to the arch Kconfig
...
KASAN_SHADOW_OFFSET is purely arch specific setting,
so it should be in arch's Kconfig file.
Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com >
Cc: Alexander Popov <alpopov@ptsecurity.com >
Cc: Alexander Potapenko <glider@google.com >
Cc: Andrey Konovalov <adech.fo@gmail.com >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Dmitry Vyukov <dvyukov@google.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Paul Bolle <pebolle@tiscali.nl >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/1435828178-10975-7-git-send-email-a.ryabinin@samsung.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 14:53:15 +02:00
Andrey Ryabinin
8515522949
x86/kasan: Add message about KASAN being initialized
...
Print informational message to tell user that kernel
runs with KASAN enabled.
Add a "kasan: " prefix to all messages in kasan_init_64.c.
Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com >
Cc: Alexander Popov <alpopov@ptsecurity.com >
Cc: Alexander Potapenko <glider@google.com >
Cc: Andrey Konovalov <adech.fo@gmail.com >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Dmitry Vyukov <dvyukov@google.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/1435828178-10975-6-git-send-email-a.ryabinin@samsung.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 14:53:14 +02:00
Andrey Ryabinin
d4f86beacc
x86/kasan: Fix boot crash on AMD processors
...
While populating zero shadow wrong bits in upper level page
tables used. __PAGE_KERNEL_RO that was used for pgd/pud/pmd has
_PAGE_BIT_GLOBAL set. Global bit is present only in the lowest
level of the page translation hierarchy (ptes), and it should be
zero in upper levels.
This bug seems doesn't cause any troubles on Intel cpus, while
on AMDs it cause kernel crash on boot.
Use _KERNPG_TABLE bits for pgds/puds/pmds to fix this.
Reported-by: Borislav Petkov <bp@alien8.de >
Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com >
Cc: <stable@vger.kernel.org > # 4.0+
Cc: Alexander Popov <alpopov@ptsecurity.com >
Cc: Alexander Potapenko <glider@google.com >
Cc: Andrey Konovalov <adech.fo@gmail.com >
Cc: Dmitry Vyukov <dvyukov@google.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/1435828178-10975-5-git-send-email-a.ryabinin@samsung.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 14:53:14 +02:00
Andrey Ryabinin
241d2c54c6
x86/kasan: Flush TLBs after switching CR3
...
load_cr3() doesn't cause tlb_flush if PGE enabled.
This may cause tons of false positive reports spamming the
kernel to death.
To fix this __flush_tlb_all() should be called explicitly
after CR3 changed.
Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com >
Cc: <stable@vger.kernel.org > # 4.0+
Cc: Alexander Popov <alpopov@ptsecurity.com >
Cc: Alexander Potapenko <glider@google.com >
Cc: Andrey Konovalov <adech.fo@gmail.com >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Dmitry Vyukov <dvyukov@google.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/1435828178-10975-4-git-send-email-a.ryabinin@samsung.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 14:53:14 +02:00
Alexander Popov
5d5aa3cfca
x86/kasan: Fix KASAN shadow region page tables
...
Currently KASAN shadow region page tables created without
respect of physical offset (phys_base). This causes kernel halt
when phys_base is not zero.
So let's initialize KASAN shadow region page tables in
kasan_early_init() using __pa_nodebug() which considers
phys_base.
This patch also separates x86_64_start_kernel() from KASAN low
level details by moving kasan_map_early_shadow(init_level4_pgt)
into kasan_early_init().
Remove the comment before clear_bss() which stopped bringing
much profit to the code readability. Otherwise describing all
the new order dependencies would be too verbose.
Signed-off-by: Alexander Popov <alpopov@ptsecurity.com >
Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com >
Cc: <stable@vger.kernel.org > # 4.0+
Cc: Alexander Potapenko <glider@google.com >
Cc: Andrey Konovalov <adech.fo@gmail.com >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Dmitry Vyukov <dvyukov@google.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/1435828178-10975-3-git-send-email-a.ryabinin@samsung.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 14:53:13 +02:00
Andrey Ryabinin
d0f77d4d04
x86/init: Clear 'init_level4_pgt' earlier
...
Currently x86_64_start_kernel() has two KASAN related
function calls. The first call maps shadow to early_level4_pgt,
the second maps shadow to init_level4_pgt.
If we move clear_page(init_level4_pgt) earlier, we could hide
KASAN low level detail from generic x86_64 initialization code.
The next patch will do it.
Signed-off-by: Andrey Ryabinin <a.ryabinin@samsung.com >
Cc: <stable@vger.kernel.org > # 4.0+
Cc: Alexander Popov <alpopov@ptsecurity.com >
Cc: Alexander Potapenko <glider@google.com >
Cc: Andrey Konovalov <adech.fo@gmail.com >
Cc: Borislav Petkov <bp@alien8.de >
Cc: Dmitry Vyukov <dvyukov@google.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/1435828178-10975-2-git-send-email-a.ryabinin@samsung.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 14:53:13 +02:00
Tony Lindgren
ae745302c0
Merge branch 'fixes-rc1' into omap-for-v4.2/fixes
2015-07-06 05:33:17 -07:00
Tomi Valkeinen
22a5dc10e3
ARM: dts: am4372.dtsi: disable rfbi
...
When DSS nodes were added to am4372.dtsi, the rfbi node was not marked
as disabled. This should have been done, as the rule of thumb is to
disable all DSS nodes that are not used, and especially rfbi, as we
don't have a driver for rfbi.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Signed-off-by: Tony Lindgren <tony@atomide.com >
2015-07-06 05:24:04 -07:00
Roger Quadros
9ab402aed3
ARM: dts: am57xx-beagle-x15: Provide supply for usb2_phy2
...
Without this USB2 breaks if USB1 is disabled or USB1
initializes after USB2 e.g. due to deferred probing.
Fixes: 5a0f93c657 ("ARM: dts: Add am57xx-beagle-x15")
Signed-off-by: Roger Quadros <rogerq@ti.com >
Cc: stable@vger.kernel.org (v3.19+)
Signed-off-by: Tony Lindgren <tony@atomide.com >
2015-07-06 05:19:59 -07:00
Waiman Long
f7d71f2052
locking/qrwlock: Rename functions to queued_*()
...
To sync up with the naming convention used in qspinlock, all the
qrwlock functions were renamed to started with "queued" instead of
"queue".
Signed-off-by: Waiman Long <Waiman.Long@hp.com >
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Cc: Arnd Bergmann <arnd@arndb.de >
Cc: Douglas Hatch <doug.hatch@hp.com >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Scott J Norton <scott.norton@hp.com >
Cc: Thomas Gleixner <tglx@linutronix.de >
Cc: Will Deacon <will.deacon@arm.com >
Link: http://lkml.kernel.org/r/1434729002-57724-2-git-send-email-Waiman.Long@hp.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 14:11:27 +02:00
Dave Gerlach
fff75ee150
ARM: dts: am4372: Add emif node
...
Add node for TI AM4372 EMIF. Without this we get a warning with the
recent commit fabbe6df (ARM: OMAP: AM43xx hwmod: Add data for am43xx
emif hwmod).
Signed-off-by: Dave Gerlach <d-gerlach@ti.com >
Tested-by: Felipe Balbi <balbi@ti.com >
Acked-by: Felipe Balbi <balbi@ti.com >
[tony@atomide.com: updated comments]
Signed-off-by: Tony Lindgren <tony@atomide.com>
2015-07-06 05:11:13 -07:00
Johan Hovold
5c250adb51
Revert "ARM: dts: am335x-boneblack: disable RTC-only sleep"
...
This reverts commit 3d76be5b93 .
The latest revision of Beaglebone Black does not support RTC-only mode.
To avoid potential hardware damage, RTC-only mode was disabled by
default by commit 7a6cb0abe1 ("ARM: dts: am335x-boneblack: disable
RTC-only sleep to avoid hardware damage").
Unfortunately, an incorrect fix had already been applied, which instead
of just disabling RTC-only mode, prevents the Beaglebone from powering
down at all.
Revert this patch to fix the power-off regression.
Signed-off-by: Johan Hovold <johan@kernel.org >
Signed-off-by: Tony Lindgren <tony@atomide.com >
2015-07-06 05:09:50 -07:00
Yann Droneaud
ebf2d2689d
perf/x86: Fix copy_from_user_nmi() return if range is not ok
...
Commit 0a196848ca ("perf: Fix arch_perf_out_copy_user default"),
changes copy_from_user_nmi() to return the number of
remaining bytes so that it behave like copy_from_user().
Unfortunately, when the range is outside of the process
memory, the return value is still the number of byte
copied, eg. 0, instead of the remaining bytes.
As all users of copy_from_user_nmi() were modified as
part of commit 0a196848ca , the function should be
fixed to return the total number of bytes if range is
not correct.
Signed-off-by: Yann Droneaud <ydroneaud@opteya.com >
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org >
Cc: Linus Torvalds <torvalds@linux-foundation.org >
Cc: Peter Zijlstra <peterz@infradead.org >
Cc: Thomas Gleixner <tglx@linutronix.de >
Link: http://lkml.kernel.org/r/1435001923-30986-1-git-send-email-ydroneaud@opteya.com
Signed-off-by: Ingo Molnar <mingo@kernel.org >
2015-07-06 14:09:27 +02:00
Hans de Goede
cb9b608706
ARM: dts: sun6i: Enable otg controller on the cs908
...
The cs908 has the otg controller connected to one of the 2 usb-A
receptacles it has on the front, so enable the otg controller in host-only
mode.
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
2015-07-06 13:36:10 +02:00
Hans de Goede
2433d82b6c
ARM: dts: sun4i: Enable otg controller on the mini-x
...
The mini-x has the otg controller connected to one of the 2 usb-A
receptacles it has on the front, so enable the otg controller in host-only
mode.
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
2015-07-06 13:36:09 +02:00
Hans de Goede
ccef71cc6a
ARM: dts: sun4i: Enable otg controller on the ba10-tvbox
...
The ba10-tvbox has the otg controller connected to one of the 2 usb-A
receptacles it has on the front, so enable the otg controller in host-only
mode.
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
2015-07-06 13:36:08 +02:00
Hans de Goede
b5977f389d
ARM: dts: sunxi: Add regulator-boot-on to usb host port regulator nodes
...
u-boot will have turned on the power to the usb host ports, so mark them
as regulator-boot-on, this stops the power on the ports from temporarily
getting turned off during boot, causing issues with e.g. usb powered
harddisks.
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
2015-07-06 13:36:06 +02:00
Hans de Goede
88651aebd2
ARM: sun8i: dts: Add Ippo-q8h v1.2 with A33
...
The Ippo-q8h is a tablet circuit board commonly found in cheap Android
tablets. The v1.2 version can be used with either an A23 or A33 SoC.
This version features 512 MB DRAM, 4G NAND, MMC, LCD, capacitive
touchscreen, accelerometer, 2 camera sensors, USB OTG, microphone
and speakers.
i2c0 is connected to the gsl1680 capacitive touch panel controller,
i2c1 is connected to an mma7660 3-axis accelerometer, these peripherals are
not supported by the kernel yet, i2c bus functionality has been tested via
i2c-dev.
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
[maxime: Removed the resolution mention, and modified the compatible to
have a unique one with the A23 version]
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
2015-07-06 13:36:03 +02:00
Chen-Yu Tsai
c077132b28
ARM: dts: sun8i: sina33: Enable USB hosts
...
The Sina33 SDK board exposes the EHCI/OHCI USB host pair.
VBUS for this port is always on and non-controllable.
Signed-off-by: Chen-Yu Tsai <wens@csie.org >
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
2015-07-06 13:36:02 +02:00
Hans de Goede
c43fa32143
ARM: dts: sun8i: Enable USB host on GA10H-A33 tablets
...
The GA10H tablets not only have an otg connector, but also a normal
usb host connector, enabled support for this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
2015-07-06 13:36:01 +02:00
Hans de Goede
4e2066ed71
ARM: dts: sun8i: Enable USB DRC on GA10H-A33 tablets
...
Enable the otg controller on GA10H-A33 tablets, for now it is enabled
in host-only mode, because true OTG support requires support for
detecting and enabling Vbus through the axp221 pmic.
For this to work the Vbus on the port must be enabled by u-boot,
or a powered hub must be used.
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
2015-07-06 13:36:00 +02:00
Hans de Goede
a85b59c14d
ARM: dts: sun8i: Enable USB DRC on Ippo Q8H-A23 tablets
...
Enable the otg controller on Ippo Q8H tablets, for now it is enabled
in host-only mode, because true OTG support requires support for
detecting and enabling Vbus through the axp221 pmic.
For this to work the Vbus on the port must be enabled by u-boot,
or a powered hub must be used.
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
2015-07-06 13:35:59 +02:00
Hans de Goede
14b7289828
ARM: dts: sun7i: Enable USB DRC on A20-OLinuxIno-Micro
...
Enable the otg/drc usb controller on the A20-OLinuxIno-Micro.
Signed-off-by: Hans de Goede <hdegoede@redhat.com >
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com >
2015-07-06 13:35:57 +02:00