30 Dec, 2011
1 commit
-
Commit 2a95ea6c0d129b4 ("procfs: do not overflow get_{idle,iowait}_time
for nohz") did not take into account that one some architectures jiffies
and cputime use different units.This causes get_idle_time() to return numbers in the wrong units, making
the idle time fields in /proc/stat wrong.Instead of converting the usec value returned by
get_cpu_{idle,iowait}_time_us to units of jiffies, use the new function
usecs_to_cputime64 to convert it to the correct unit of cputime64_t.Signed-off-by: Andreas Schwab
Acked-by: Michal Hocko
Cc: Arnd Bergmann
Cc: "Artem S. Tashkinov"
Cc: Dave Jones
Cc: Alexey Dobriyan
Cc: Thomas Gleixner
Cc: "Luck, Tony"
Cc: Benjamin Herrenschmidt
Cc: Martin Schwidefsky
Cc: Heiko Carstens
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Dec, 2011
4 commits
-
This is required for THIS_MODULE. We recently stopped acquiring
it via some other header.Signed-off-by: Scott Wood
Signed-off-by: Alexander Graf -
Currently kvmppc_start_thread() tries to wake other SMT threads via
xics_wake_cpu(). Unfortunately xics_wake_cpu only exists when
CONFIG_SMP=Y so when compiling with CONFIG_SMP=N we get:arch/powerpc/kvm/built-in.o: In function `.kvmppc_start_thread':
book3s_hv.c:(.text+0xa1e0): undefined reference to `.xics_wake_cpu'The following should be fine since kvmppc_start_thread() shouldn't
called to start non-zero threads when SMP=N since threads_per_core=1.Signed-off-by: Michael Neuling
Signed-off-by: Alexander Graf -
kvmppc_h_pr is only available if CONFIG_KVM_BOOK3S_64_PR.
Signed-off-by: Andreas Schwab
Signed-off-by: Alexander Graf -
compute_tlbie_rb is only used on ppc64 and cannot be compiled on ppc32.
Signed-off-by: Andreas Schwab
Signed-off-by: Alexander Graf
25 Nov, 2011
2 commits
-
Signed-off-by: Tony Breeds
Acked-by: Josh Boyer
Signed-off-by: Benjamin Herrenschmidt -
arch/powerpc/mm/hugetlbpage.c: In function 'reserve_hugetlb_gpages':
arch/powerpc/mm/hugetlbpage.c:312:2: error: implicit declaration of function 'parse_args'Signed-off-by: Kumar Gala
Signed-off-by: Benjamin Herrenschmidt
24 Nov, 2011
6 commits
-
At this point, ehv_pic has been allocated but not stored anywhere, so it
should be freed before leaving the function.A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)//
@exists@
local idexpression x;
statement S,S1;
expression E;
identifier fl;
expression *ptr != NULL;
@@x = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
}
when any
when != true x == NULL
x->fl
...>
(
if (x == NULL) S1
|
if (...) { ... when != x
when forall
(
return \(0\|\|ptr\);
|
* return ...;
)
}
)
//Signed-off-by: Julia Lawall
Acked-by: Timur Tabi
Signed-off-by: Kumar Gala -
If Freescale LBC driver fails to initialise itself from device tree, then
internal structure is freed only but not NULL-fied. As result functions
fsl_lbc_find() after checking the structure is not NULL are trying to
access device registers.Signed-off-by: Alexandre Rusev
Signed-off-by: Kumar Gala -
QE_General4 should only round up the divisor iff divisor is > 3.
Rounding up lower divisors makes the error too big, causing USB
on MPC832x to fail.Signed-off-by: Joakim Tjernlund
Acked-by: Timur Tabi
Signed-off-by: Kumar Gala -
arch/powerpc/platforms/85xx/p3060_qds.c: In function '__machine_initcall_p3060_qds_declare_of_platform_devices':
arch/powerpc/platforms/85xx/p3060_qds.c:73:1: error: implicit declaration of function 'declare_of_platform_devices'declare_of_platform_devices should have been corenet_ds_publish_devices.
Signed-off-by: Kumar Gala
-
The driver for the Freescale P3060 QDS got added by commit 96cc017c5b
("[...] Add support for P3060QDS board"). Its Kconfig entry selects
MPC8xxx_GPIO. But at the time that driver got added MPC8xxx_GPIO was
already renamed to GPIO_MPC8XXX, by commit c68308dd50c ("gpio: move
mpc8xxx/512x gpio driver to drivers/gpio").So make this driver select GPIO_MPC8XXX.
Signed-off-by: Paul Bolle
Acked-by: Wolfram Sang
Signed-off-by: Kumar Gala -
P1023 external IRQ[4:6, 11] are not pin out, but the interrupts are
utilized by the PCIe controllers. As they are not exposed as pins we
need to set them as active-high (internal to the SoC these interrupts
are pulled down).IRQs[0:3,7:10] are pulled up on the board so we have them set as
active-low.Signed-off-by: Roy Zang
Signed-off-by: Kumar Gala
21 Nov, 2011
1 commit
-
* 'kvm-updates/3.2' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
KVM guest: prevent tracing recursion with kvmclock
Revert "KVM: PPC: Add support for explicit HIOR setting"
KVM: VMX: Check for automatic switch msr table overflow
KVM: VMX: Add support for guest/host-only profiling
KVM: VMX: add support for switching of PERF_GLOBAL_CTRL
KVM: s390: announce SYNC_MMU
KVM: s390: Fix tprot locking
KVM: s390: handle SIGP sense running intercepts
KVM: s390: Fix RUNNING flag misinterpretation
17 Nov, 2011
7 commits
-
This reverts commit a15bd354f083f20f257db450488db52ac27df439.
It exceeded the padding on the SREGS struct, rendering the ABI
backwards-incompatible.Conflicts:
arch/powerpc/kvm/powerpc.c
include/linux/kvm.hSigned-off-by: Avi Kivity
-
On PPC64, put_sigset_t converts a sigset_t to a compat_sigset_t
before copying it to userspace. There is a typo in the case that
we have 4 words to copy, meaning that we corrupt the compat_sigset_t.It appears that _NSIG_WORDS can't be greater than 2 at the moment
so this code is probably always optimised away anyway.Signed-off-by: Will Deacon
Signed-off-by: Benjamin Herrenschmidt -
The Documentation/memory-barriers.txt document requires that atomic
operations that return a value act as a memory barrier both before
and after the actual atomic operation.Our current implementation doesn't guarantee this. More specifically,
while a load following the isync can not be issued before stwcx. has
completed, that completion doesn't architecturally means that the
result of stwcx. is visible to other processors (or any previous stores
for that matter) (typically, the other processors L1 caches can still
hold the old value).This has caused an actual crash in RCU torture testing on Power 7
This fixes it by changing those atomic ops to use new macros instead
of RELEASE/ACQUIRE barriers, called ATOMIC_ENTRY and ATMOIC_EXIT barriers,
which are then defined respectively to lwsync and sync.I haven't had a chance to measure the performance impact (or rather
what I measured with kernel compiles is in the noise, I yet have to
find a more precise benchmark)Signed-off-by: Benjamin Herrenschmidt
Acked-by: Paul E. McKenney -
Recent binutils refuses to assemble AltiVec opcodes when in e500/SPE
mode, as some of those opcodes alias the "SPE" instructions. This
triggers an ancient binutils version check even when building a kernel
with CONFIG_ALTIVEC disabled.In theory, the check could be conditionalized on CONFIG_ALTIVEC, but in
practice it has long outlived its utility. It is virtually impossible
to find binutils older than 2.12.1 (released 2002) in the wild anymore.
Even ancient RedHat Enterprise Linux 4 has binutils-2.14.To fix the kernel build when done natively on e500 systems with this new
binutils, the test is simply removed.Signed-off-by: Kyle Moffett
Signed-off-by: Benjamin Herrenschmidt -
With the introduction of CONFIG_PPC_ADV_DEBUG_REGS user space debug is
broken on Book-E 64-bit parts that support delayed debug events. When
switch_booke_debug_regs() sets DBCR0 we'll start getting debug events as
MSR_DE is also set and we aren't able to handle debug events from kernel
space.We can remove the hack that always enables MSR_DE and loads up DBCR0 and
just utilize switch_booke_debug_regs() to get user space debug working
again.We still need to handle critical/debug exception stacks & proper
save/restore of state for those exception levles to support debug events
from kernel space like we have on 32-bit.Signed-off-by: Kumar Gala
Signed-off-by: Benjamin Herrenschmidt -
All of DebugException is already protected by CONFIG_PPC_ADV_DEBUG_REGS
there is no need to have another such ifdef inside the function.Signed-off-by: Kumar Gala
Signed-off-by: Benjamin Herrenschmidt -
We had an existing ifdef for 4xx & BOOKE processors that got changed to
CONFIG_PPC_ADV_DEBUG_REGS. The define has nothing to do with
CONFIG_PPC_ADV_DEBUG_REGS. The define really should be:#if defined(CONFIG_4xx) || defined(CONFIG_BOOKE)
and not
#ifdef CONFIG_PPC_ADV_DEBUG_REGS
Signed-off-by: Kumar Gala
Signed-off-by: Benjamin Herrenschmidt
16 Nov, 2011
10 commits
-
Move the PS3 IPI message setup from ps3_smp_setup_cpu() to ps3_smp_probe().
Fixes startup warnings like these:
------------[ cut here ]------------
WARNING: at kernel/lockdep.c:2649
Modules linked in:
...
---[ end trace 31fd0ba7d8756001 ]---Signed-off-by: Geoff Levand
Signed-off-by: Benjamin Herrenschmidt -
Fixes the PS3 bootup hang introduced in 3.0-rc1 by:
commit 317f394160e9beb97d19a84c39b7e5eb3d7815a
sched: Move the second half of ttwu() to the remote cpuMove the PS3's LV1 EOI call lv1_end_of_interrupt_ext() from ps3_chip_eoi()
to ps3_get_irq() for IPI messages.If lv1_send_event_locally() is called between a previous call to
lv1_send_event_locally() and the coresponding call to
lv1_end_of_interrupt_ext() the second event will not be delivered to the
target cpu.The PS3's SMP IPIs are implemented using lv1_send_event_locally(), so if two
IPI messages of the same type are sent to the same target in a relatively
short period of time the second IPI event can become lost when
lv1_end_of_interrupt_ext() is called from ps3_chip_eoi().CC: stable@kernel.org
Signed-off-by: Geoff Levand
Signed-off-by: Benjamin Herrenschmidt -
If you build with KVM and UP it fails with the following due to a
missing include./arch/powerpc/kvm/book3s_hv.c: In function 'do_h_register_vpa':
arch/powerpc/kvm/book3s_hv.c:156:10: error: 'H_PARAMETER' undeclared (first use in this function)
arch/powerpc/kvm/book3s_hv.c:156:10: note: each undeclared identifier is reported only once for each function it appears in
arch/powerpc/kvm/book3s_hv.c:192:12: error: 'H_RESOURCE' undeclared (first use in this function)
arch/powerpc/kvm/book3s_hv.c:222:9: error: 'H_SUCCESS' undeclared (first use in this function)
arch/powerpc/kvm/book3s_hv.c: In function 'kvmppc_pseries_do_hcall':
arch/powerpc/kvm/book3s_hv.c:228:30: error: 'H_SUCCESS' undeclared (first use in this function)
arch/powerpc/kvm/book3s_hv.c:232:7: error: 'H_CEDE' undeclared (first use in this function)
arch/powerpc/kvm/book3s_hv.c:234:7: error: 'H_PROD' undeclared (first use in this function)
arch/powerpc/kvm/book3s_hv.c:238:10: error: 'H_PARAMETER' undeclared (first use in this function)
arch/powerpc/kvm/book3s_hv.c:250:7: error: 'H_CONFER' undeclared (first use in this function)
arch/powerpc/kvm/book3s_hv.c:252:7: error: 'H_REGISTER_VPA' undeclared (first use in this function)
make[2]: *** [arch/powerpc/kvm/book3s_hv.o] Error 1Signed-off-by: Michael Neuling
cc: stable@kernel.org (3.1 only)
Signed-off-by: Benjamin Herrenschmidt -
The trace_hardirqs_off will use CALLER_ADDR0 and CALLER_ADDR1.
If an exception occurs in user mode, there is only one stack frame
on the stack and accessing the CALLER_ADDR1 will causes the following
call trace. So we create a dummy stack frame to make
trace_hardirqs_off happy.WARNING: at kernel/smp.c:459
Modules linked in:
NIP: c0093280 LR: c00930a0 CTR: c0010780
REGS: edb87ae0 TRAP: 0700 Not tainted (3.1.0)
MSR: 00021002 CR: 28002888 XER: 00000000
TASK = edce2ac0[17658] 'mthread-lock-on' THREAD: edb86000 CPU: 5
GPR00: 00000001 edb87b90 edce2ac0 00000005 c0019594 edb87bd8 00000001 00000fe3
GPR08: 00041000 c084138c 4e20120d edb87b90 48002888 1001aa7c 00000000 00000000
GPR16: 48830000 10012a8c 00000000 10000af4 00000001 c0810000 00000000 00000000
GPR24: ee9aa920 c0816a18 00000000 00000005 c0019594 edb87bd8 ee20178c edb87b90
NIP [c0093280] smp_call_function_many+0x214/0x2b4
LR [c00930a0] smp_call_function_many+0x34/0x2b4
Call Trace:
[edb87b90] [c00930a0] smp_call_function_many+0x34/0x2b4 (unreliable)
[edb87bd0] [c00194ec] __flush_tlb_page+0xac/0x100
[edb87c00] [c001957c] flush_tlb_page+0x3c/0x54
[edb87c10] [c00180ac] ptep_set_access_flags+0x74/0x12c
[edb87c40] [c0128068] handle_pte_fault+0x2f0/0x9ac
[edb87cb0] [c0128c3c] handle_mm_fault+0x104/0x1dc
[edb87ce0] [c05f40f4] do_page_fault+0x2dc/0x630
[edb87e50] [c001078c] handle_page_fault+0xc/0x80Signed-off-by: Benjamin Herrenschmidt
-
kdump fails because we try to execute an HV only instruction. Feature
fixups are being applied after we copy the exception vectors down to 0
so they miss out on any updates.We have always had this issue but it only became critical in v3.0
when we added CFAR support (breaks POWER5) and v3.1 when we added
POWERNV (breaks everyone).Signed-off-by: Anton Blanchard
Cc: [v3.0+]
Signed-off-by: Benjamin Herrenschmidt -
I had to debug a strange situation where all manner of things were
failing. SMT threads, storage and network were all completely broken.The root cause was we couldn't find enough memory to instantiate RTAS -
this was a network install so the initrd was huge.Instead of limping along and failing in mysterious ways we should just
panic up front if RTAS exists and we can't allocate space for it.Signed-off-by: Anton Blanchard
Signed-off-by: Benjamin Herrenschmidt -
Kexec is not supported on 47x. 47x is a variant of 44x with slightly
different MMU and SMP support. There was a typo in the config dependency
for kexec. This patch fixes the same.Signed-off-by: Suzuki K. Poulose
Signed-off-by: Paul Bolle
Cc: Kumar Gala
Cc: Josh Boyer
Cc: linux ppc dev
Signed-off-by: Benjamin Herrenschmidt -
Signed-off-by: Al Viro
Signed-off-by: Benjamin Herrenschmidt -
Should do what other architectures do and wrap all that code into
the appropriate ifdefSigned-off-by: Al Viro
Signed-off-by: Benjamin Herrenschmidt -
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux:
fsl-rio: fix compile error
15 Nov, 2011
1 commit
-
The "#include " was replaced by "#include "
in the patch "powerpc: various straight conversions from module.h --> export.h".
This will cause the following compile problem:
arch/powerpc/sysdev/fsl_rio.c: In function 'fsl_rio_mcheck_exception':
arch/powerpc/sysdev/fsl_rio.c:296: error: implicit declaration of function 'search_exception_tables'.The file fsl_rio.c needs the declaration of function "search_exception_tables"
in the header file "linux/module.h".Signed-off-by: Liu Gang
Signed-off-by: Paul Gortmaker
08 Nov, 2011
8 commits
-
When running with HV KVM and CBE config options enabled, I get
build failures like the following:arch/powerpc/kernel/head_64.o: In function `cbe_system_error_hv':
(.text+0x1228): undefined reference to `do_kvm_0x1202'
arch/powerpc/kernel/head_64.o: In function `cbe_maintenance_hv':
(.text+0x1628): undefined reference to `do_kvm_0x1602'
arch/powerpc/kernel/head_64.o: In function `cbe_thermal_hv':
(.text+0x1828): undefined reference to `do_kvm_0x1802'This is because we jump to a KVM handler when HV is enabled, but we
only generate the handler with PR KVM mode.Signed-off-by: Alexander Graf
Signed-off-by: Benjamin Herrenschmidt -
The lv1_gpu_attribute hcall takes three, not five input
arguments. Adjust the lv1 hcall table and all calls.Signed-off-by: Geoff Levand
CC: Takashi Iwai
Acked-by: Takashi Iwai
Signed-off-by: Benjamin Herrenschmidt -
Fix uninitialized variable warnings in build of repository.c
Signed-off-by: Geoff Levand
Signed-off-by: Benjamin Herrenschmidt -
Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [b738a50a:
genirq: Warn when handler enables interrupts]).So now this flag is a NOOP and can be removed.
Signed-off-by: Yong Zhang
Acked-by: Arnd Bergmann
Acked-by: Geoff Levand
Signed-off-by: Benjamin Herrenschmidt -
This patch adds support for numa topology on powernv platforms running
OPAL formware. It checks for the type of platform at run time and
sets the affinity form correctly so that NUMA topology can be discovered
correctly.Signed-off-by: Dipankar Sarma
Signed-off-by: Benjamin Herrenschmidt -
We've resisted adding System RAM to /proc/iomem because it is
the wrong place for it. Unfortunately we continue to find tools
that rely on this behaviour so give up and add it in.Signed-off-by: Anton Blanchard
Signed-off-by: Benjamin Herrenschmidt -
Add HV mode KVM to Book3 server 64bit defconfigs as a module.
Doesn't add much to the size:
text data bss dec hex filename
8244109 4686767 994000 13924876 d47a0c vmlinux.vanilla
8256092 4691607 994128 13941827 d4bc43 vmlinux.kvmThis should enable more testing of this configuration.
Signed-off-by: Michael Neuling
Signed-off-by: Benjamin Herrenschmidt