From: Vijaya Kumar K <Vijaya.Kumar(a)caviumnetworks.com>
Based on the step-handler and break-handler hooks patch from
Sandeepa (Patch 1), KGDB debugging support is added for EL1
debug in AArch64 mode. Any updates that come for Patch 1 from
Sandeepa will be rebased in next version
With second patch,register layout is updated to be inline with GDB tool.
Basic GDB connection, break point set/clear and info commands
are supported except step/next debugging
With third patch, step/next debugging support is added, where in
pc is updated to point to the instruction to be stepped and
stopped.
With fourth patch, the compile time breakpoint instruction
reordering is fixed by making kgbd_breakpoint() as noinline
Tested with ARM64 simulator
v5:
- Updated BRK #imm16 value to 0x400 & 0x401 as per recommendation
as per Marcus recommendataion
http://patchwork.ozlabs.org/patch/290801/
- Rebased to 3.13 AArch64 kernel
v4:
- Updated kgdb_single_step and kgdb_cpu_doing_single_step
variables properly based on gdb state
v3:
- Rebased to v4 version of Sandeepa Prabhu's patch (patch 1)
- Made dynamic break point instruction encoding generic
- Made ESR value encoding generic for dynamic and compile break point
- Used memcpy and memset to copy register contents to gdb buffer
- Fixed reordering of break point instruction by compiler with
patch 3
- Rebased against AAach64 upstream kernel
v2:
- Moved break instruction encoding to debug-monitors.h file
- Fixed endianess of compile break instruction encoding
- Updated I/O buffer sizes
- Updated register buffer size
- Remove changes to debug_exception handler in entry.S for
- ELR update and step debugging with update pc instead of ELR
- Rebased against AArch64 upstream kernel
v1:
- Initial patch-set
Sandeepa Prabhu (1):
arm64: support single-step and breakpoint handler hooks
Vijaya Kumar K (3):
AArch64: KGDB: Add Basic KGDB support
AArch64: KGDB: Add step debugging support
KGDB: make kgdb_breakpoint() as noinline
arch/arm64/include/asm/debug-monitors.h | 68 +++++++
arch/arm64/include/asm/kgdb.h | 86 ++++++++
arch/arm64/kernel/Makefile | 1 +
arch/arm64/kernel/debug-monitors.c | 86 +++++++-
arch/arm64/kernel/entry.S | 2 +
arch/arm64/kernel/kgdb.c | 338 +++++++++++++++++++++++++++++++
kernel/debug/debug_core.c | 2 +-
7 files changed, 581 insertions(+), 2 deletions(-)
create mode 100644 arch/arm64/include/asm/kgdb.h
create mode 100644 arch/arm64/kernel/kgdb.c
--
1.7.9.5
This patch adds cpufreq callbacks to dpm_{suspend|resume}_noirq() for handling
suspend/resume of cpufreq governors.
There are multiple problems that are fixed by this patch:
- Nishanth Menon (TI) found an interesting problem on his platform, OMAP. His board
wasn't working well with suspend/resume as calls for removing non-boot CPUs
was turning out into a call to drivers ->target() which then tries to play
with regulators. But regulators and their I2C bus were already suspended and
this resulted in a failure. Many platforms have such problems, samsung, tegra,
etc.. They solved it with driver specific PM notifiers where they used to
disable their driver's ->target() routine.
- Lan Tianyu (Intel) & Jinhyuk Choi (Broadcom) found another issue where
tunables configuration for clusters/sockets with non-boot CPUs was getting
lost after suspend/resume, as we were notifying governors with
CPUFREQ_GOV_POLICY_EXIT on removal of the last cpu for that policy and so
deallocating memory for tunables. This is also fixed with this patch as we
don't allow any operation on Governors during suspend/resume now.
Reported-and-tested-by: Lan Tianyu <tianyu.lan(a)intel.com>
Reported-and-tested-by: Nishanth Menon <nm(a)ti.com>
Reported-by: Jinhyuk Choi <jinchoi(a)broadcom.com>
Signed-off-by: Viresh Kumar <viresh.kumar(a)linaro.org>
---
This is almost same as 1/6 of V3 version of this patchset:
https://lkml.org/lkml/2013/11/25/838
This is done to get some initial fixes for 3.13. These are already tested by
both the reporters of initial problems. Tegra/exynos/s5p will keep running their
PM notifiers until v3.14, as they are currently able to work with them..
drivers/base/power/main.c | 3 +++
drivers/cpufreq/cpufreq.c | 50 +++++++++++++++++++++++++++++++++++++++++++++++
include/linux/cpufreq.h | 8 ++++++++
3 files changed, 61 insertions(+)
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 1b41fca..e3219df 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -29,6 +29,7 @@
#include <linux/async.h>
#include <linux/suspend.h>
#include <trace/events/power.h>
+#include <linux/cpufreq.h>
#include <linux/cpuidle.h>
#include <linux/timer.h>
@@ -540,6 +541,7 @@ static void dpm_resume_noirq(pm_message_t state)
dpm_show_time(starttime, state, "noirq");
resume_device_irqs();
cpuidle_resume();
+ cpufreq_resume();
}
/**
@@ -955,6 +957,7 @@ static int dpm_suspend_noirq(pm_message_t state)
ktime_t starttime = ktime_get();
int error = 0;
+ cpufreq_suspend();
cpuidle_pause();
suspend_device_irqs();
mutex_lock(&dpm_list_mtx);
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 02d534d..b6c7821 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -26,6 +26,7 @@
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/slab.h>
+#include <linux/suspend.h>
#include <linux/syscore_ops.h>
#include <linux/tick.h>
#include <trace/events/power.h>
@@ -47,6 +48,9 @@ static LIST_HEAD(cpufreq_policy_list);
static DEFINE_PER_CPU(char[CPUFREQ_NAME_LEN], cpufreq_cpu_governor);
#endif
+/* Flag to suspend/resume CPUFreq governors */
+static bool cpufreq_suspended;
+
static inline bool has_target(void)
{
return cpufreq_driver->target_index || cpufreq_driver->target;
@@ -1462,6 +1466,48 @@ static struct subsys_interface cpufreq_interface = {
.remove_dev = cpufreq_remove_dev,
};
+/*
+ * Callbacks for suspending/resuming governors as some platforms can't change
+ * frequency after this point in suspend cycle. Because some of the devices
+ * (like: i2c, regulators, etc) they use for changing frequency are suspended
+ * quickly after this point.
+ */
+void cpufreq_suspend(void)
+{
+ struct cpufreq_policy *policy;
+
+ if (!has_target())
+ return;
+
+ pr_debug("%s: Suspending Governors\n", __func__);
+
+ list_for_each_entry(policy, &cpufreq_policy_list, policy_list)
+ if (__cpufreq_governor(policy, CPUFREQ_GOV_STOP))
+ pr_err("%s: Failed to stop governor for policy: %p\n",
+ __func__, policy);
+
+ cpufreq_suspended = true;
+}
+
+void cpufreq_resume(void)
+{
+ struct cpufreq_policy *policy;
+
+ if (!has_target())
+ return;
+
+ pr_debug("%s: Resuming Governors\n", __func__);
+
+ cpufreq_suspended = false;
+
+ list_for_each_entry(policy, &cpufreq_policy_list, policy_list)
+ if (__cpufreq_governor(policy, CPUFREQ_GOV_START) ||
+ __cpufreq_governor(policy,
+ CPUFREQ_GOV_LIMITS))
+ pr_err("%s: Failed to start governor for policy: %p\n",
+ __func__, policy);
+}
+
/**
* cpufreq_bp_suspend - Prepare the boot CPU for system suspend.
*
@@ -1764,6 +1810,10 @@ static int __cpufreq_governor(struct cpufreq_policy *policy,
struct cpufreq_governor *gov = NULL;
#endif
+ /* Don't start any governor operations if we are entering suspend */
+ if (cpufreq_suspended)
+ return 0;
+
if (policy->governor->max_transition_latency &&
policy->cpuinfo.transition_latency >
policy->governor->max_transition_latency) {
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index dc196bb..ee5fe9d 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -280,6 +280,14 @@ cpufreq_verify_within_cpu_limits(struct cpufreq_policy *policy)
policy->cpuinfo.max_freq);
}
+#ifdef CONFIG_CPU_FREQ
+void cpufreq_suspend(void);
+void cpufreq_resume(void);
+#else
+static inline void cpufreq_suspend(void) {}
+static inline void cpufreq_resume(void) {}
+#endif
+
/*********************************************************************
* CPUFREQ NOTIFIER INTERFACE *
*********************************************************************/
--
1.7.12.rc2.18.g61b472e
From: Radha Mohan Chintakuntla <rchintakuntla(a)cavium.com>
This patch series provides an implementation of supporting 48-bit
Physical Addresses for ARMv8 platforms. It is the maximum width that
any ARMv8 based processor can support.
The implementation extends the existing support of 40-bit PA.The kernel
and user space will now be able to access 128TB each. With 4KB page size
the Linux now will be using 4 levels of page tables by making use of
'pud'. And with 64KB page size the Linux will be using 3 levels of page
tables.
The code has been tested with LTP.
Radha Mohan Chintakuntla (2):
arm64: Add support for 48-bit Physical Addresses
arm64: Add 48-bit PA support for 64KB page size
arch/arm64/include/asm/memory.h | 6 +--
arch/arm64/include/asm/page.h | 4 +-
arch/arm64/include/asm/pgalloc.h | 20 ++++++-
arch/arm64/include/asm/pgtable-3level-hwdef.h | 34 ++++++++++++
arch/arm64/include/asm/pgtable-4level-hwdef.h | 57 ++++++++++++++++++++
arch/arm64/include/asm/pgtable-4level-types.h | 71 +++++++++++++++++++++++++
arch/arm64/include/asm/pgtable-hwdef.h | 9 ++--
arch/arm64/include/asm/pgtable.h | 50 +++++++++++++++---
arch/arm64/include/asm/tlb.h | 2 -
arch/arm64/kernel/head.S | 55 +++++++++++++++++--
arch/arm64/kernel/traps.c | 7 +++
arch/arm64/mm/proc.S | 2 +-
12 files changed, 289 insertions(+), 28 deletions(-)
create mode 100644 arch/arm64/include/asm/pgtable-4level-hwdef.h
create mode 100644 arch/arm64/include/asm/pgtable-4level-types.h
The Power State and Coordination Interface (PSCI) specification defines
SYSTEM_OFF and SYSTEM_RESET functions for system poweroff and reboot.
This patchset adds emulation of PSCI SYSTEM_OFF and SYSTEM_RESET functions
in KVM ARM/ARM64 by forwarding them to user space (QEMU or KVMTOOL) using
KVM_EXIT_SHUTDOWN and KVM_EXIT_RESET exit reasons.
To try this patch from guest kernel, we will need PSCI-based restart and
poweroff support in the guest kenel for both ARM and ARM64.
Rob Herring has already submitted patches for PSCI-based restart and
poweroff in ARM kernel but these are not merged yet due unstable device
tree bindings of kernel PSCI support. We will be having similar patches
for PSCI-based restart and poweroff in ARM64 kernel.
(Refer http://www.spinics.net/lists/arm-kernel/msg262217.html)
(Refer http://www.spinics.net/lists/devicetree/msg05348.html)
Anup Patel (2):
KVM: Add KVM_EXIT_RESET to user space API header
ARM/ARM64: KVM: Forward PSCI SYSTEM_OFF and SYSTEM_RESET to user
space
arch/arm/include/asm/kvm_psci.h | 2 +-
arch/arm/include/uapi/asm/kvm.h | 2 ++
arch/arm/kvm/handle_exit.c | 7 ++++++-
arch/arm/kvm/psci.c | 38 +++++++++++++++++++++++++++++--------
arch/arm64/include/asm/kvm_psci.h | 2 +-
arch/arm64/include/uapi/asm/kvm.h | 2 ++
arch/arm64/kvm/handle_exit.c | 10 ++++++----
include/uapi/linux/kvm.h | 1 +
8 files changed, 49 insertions(+), 15 deletions(-)
--
1.7.9.5
From: Al Stone <al.stone(a)linaro.org>
This series of patches starts with Hanjun's patch to create a kernel
config item for CONFIG_ACPI_REDUCED_HARDWARE [0]. Building on that, I
then reviewed all of the code that touched any of several fields in the
FADT that the OSPM is supposed to ignore when ACPI is in Hardware Reduced
mode [1]. Any time there was a use of one of the fields to be ignored,
I evaluated whether or not the code was implementing Hardware Reduced
mode correctly. Similarly, for each the flags in the FADT flags field
that are to be ignored in Hardware Reduced mode, the kernel code was again
scanned for proper usage. The remainder of the patches are to fix all of
the situations I could find where the kernel would not behave correctly
in this ACPI mode.
These seem to work just fine on the RTSM model for ARMv7, both with and
without ACPI enabled, and with and without ACPI_REDUCED_HARDWARE enabled;
similarly for the FVP model for ARMv8. The patches for ACPI on ARM
hardware will be coming later but they presume that reduced HW mode is
functioning correctly. In the meantime, there's no way I can think of
to test all possible scenarios so feedback would be greatly appreciated.
[0] List at https://wiki.linaro.org/LEG/Engineering/Kernel/ACPI/AcpiReducedHw#Section_5…
[1] Please see the ACPI Specification v5.0 for details on Hardware Reduced
mode.
Changes for v2:
-- Remove patch that was outside of reduced HW mode changes
-- Simplify CONFIG_ACPI_REDUCED_HARDWARE in Kconfig
-- Simplify use of CONFIG_ACPI_REDUCED_HARDWARE in #ifdefs
-- Ensure changelogs are present
-- Combine and simplify previous patches 8 & 10
Al Stone (6):
ACPI: introduce CONFIG_ACPI_REDUCED_HARDWARE to enable this ACPI mode
ACPI: bus master reload not supported in reduced HW mode
ACPI: HW reduced mode does not allow use of the FADT sci_interrupt
field
ACPI: ARM: exclude DMI calls
ACPI: do not reserve memory regions for some FADT entries in HW
reduced mode
ACPI: in HW reduced mode, using FADT PM information is not allowed.
drivers/acpi/Kconfig | 8 ++++++++
drivers/acpi/bus.c | 3 ++-
drivers/acpi/osl.c | 24 ++++++++++++------------
drivers/acpi/pci_link.c | 2 ++
drivers/acpi/processor_idle.c | 16 ++++++++++++++--
include/acpi/platform/aclinux.h | 4 ++++
include/linux/dmi.h | 2 +-
7 files changed, 43 insertions(+), 16 deletions(-)
--
1.8.3.1
From: Arnaldo Carvalho de Melo <acme(a)ghostprotocols.net>
Hi Ingo,
I ended up deciding sending the whole series, repeating the first
dozen, with the "perf evsel: Skip ignored symbols while printing callchain"
one fixed up wrt Adrian's report.
Please consider applying,
Best Regards,
- Arnaldo
The following changes since commit 65661f96d3b32f4b28fef26d21be81d7e173b965:
perf/x86: Add RAPL hrtimer support (2013-11-27 15:31:23 +0100)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux tags/perf-core-for-mingo
for you to fetch changes up to aa880acd0853437933cefcb7d745b03fde3e6a3d:
perf tools unwinding: Use the per-feature check flags (2013-11-27 16:50:28 -0300)
----------------------------------------------------------------
perf/core improvements and fixes:
. Make per-cpu mmaps the default in 'perf record', from Adrian Hunter.
. Default -t/--thread 'perf record' option to no inheritance,
from Adrian Hunter.
. Make 'perf top -g' refer to callchains, for consistency with other tools,
from David Ahern.
. Skip ignored symbols while printing callchain, from David Ahern.
. Print callchains and symbols if they exist in 'perf script',
from David Ahern.
. Remove thread summary coloring in 'perf trace', from Pekka Enberg.
. zsh completion support, from Ramkumar Ramachandra.
. 'perf timechart' improvements, including backtrace support,
from Stanislav Fomichev.
. Fix using kcore files stored in the buildid cache when doing report/annotate
in non-live sessions, from Adrian Hunter
. Minor 'timechart' cleanups.
. Fix libunwind build suport on ARM, from Jean Pihet.
. Fix tags/TAGS targets rebuilding, from Jiri Olsa.
. Add options to show comm, fork, exit and mmap PERF_RECORD_ events in
'perf script', from Namhyung Kim.
Signed-off-by: Arnaldo Carvalho de Melo <acme(a)redhat.com>
----------------------------------------------------------------
Adrian Hunter (5):
perf record: Make per-cpu mmaps the default.
perf tools: Allow '--inherit' as the negation of '--no-inherit'
perf tools: Add option macro OPT_BOOLEAN_SET
perf record: Default -t option to no inheritance
perf symbols: Fix not finding kcore in buildid cache
Arnaldo Carvalho de Melo (2):
perf timechart: Remove some needless struct forward declarations
perf timechart: Remove misplaced __maybe_unused
David Ahern (6):
perf top: Make -g refer to callchains
perf evsel: Skip ignored symbols while printing callchain
perf symbols: Move idle syms check from top to generic function
perf thread: Move comm_list check into function
perf tools: Export setup_list
perf script: Print callchains and symbols if they exist
Jean Pihet (2):
perf tools: Add per-feature check flags
perf tools unwinding: Use the per-feature check flags
Jiri Olsa (1):
perf tools: Fix tags/TAGS targets rebuilding
Namhyung Kim (3):
perf script: Move evname print code to process_event()
perf script: Print comm, fork and exit events also
perf script: Print mmap[2] events also
Pekka Enberg (1):
perf trace: Remove thread summary coloring
Ramkumar Ramachandra (5):
perf completion: Introduce a layer of indirection
perf completion: Factor out compgen stuff
perf completion: Factor out call to __ltrim_colon_completions
perf completion: Introduce zsh support
perf completion: Rename file to reflect zsh support
Stanislav Fomichev (8):
perf timechart: Always try to print at least 15 tasks
perf timechart: Add option to limit number of tasks
perf timechart: Use proc_num to implement --power-only
perf timechart: Add support for displaying only tasks related data
perf timechart: Group figures and add title with details
perf timechart: Add support for -P and -T in timechart recording
perf timechart: Add backtrace support
perf timechart: dynamically determine event fields offset
Steven Rostedt (1):
tools lib traceevent: Use helper trace-seq in print functions like kernel does
tools/lib/traceevent/event-parse.c | 7 +-
tools/perf/Documentation/perf-record.txt | 12 +-
tools/perf/Documentation/perf-script.txt | 6 +
tools/perf/Documentation/perf-timechart.txt | 26 +-
tools/perf/Documentation/perf-top.txt | 5 +-
tools/perf/Makefile | 7 +-
tools/perf/Makefile.perf | 4 +-
tools/perf/builtin-record.c | 13 +-
tools/perf/builtin-script.c | 209 ++++++++++-
tools/perf/builtin-timechart.c | 418 ++++++++++++++-------
tools/perf/builtin-top.c | 29 +-
tools/perf/builtin-trace.c | 13 +-
tools/perf/config/Makefile | 38 +-
tools/perf/config/feature-checks/Makefile | 6 +-
tools/perf/{bash_completion => perf-completion.sh} | 100 ++++-
tools/perf/perf.h | 1 +
tools/perf/tests/attr/test-record-no-inherit | 2 +-
tools/perf/util/event.c | 3 +-
tools/perf/util/evlist.c | 6 +-
tools/perf/util/evsel.c | 5 +-
tools/perf/util/parse-options.c | 21 ++
tools/perf/util/parse-options.h | 8 +
tools/perf/util/session.c | 10 +-
tools/perf/util/svghelper.c | 77 +++-
tools/perf/util/svghelper.h | 11 +-
tools/perf/util/symbol.c | 41 +-
tools/perf/util/symbol.h | 4 +
tools/perf/util/target.c | 11 +-
tools/perf/util/target.h | 4 +-
tools/perf/util/thread.h | 12 +
30 files changed, 855 insertions(+), 254 deletions(-)
rename tools/perf/{bash_completion => perf-completion.sh} (65%)