Another round of cosmetic updates here, this should address everything
from the last round.
arm64: topology: Implement basic CPU topology support
arm64: topology: Add support for topology DT bindings
arm64: topology: Tell the scheduler about the relative
arm64: topology: Provide relative power numbers for cores
In a multi-platform scenario, the hard-coded major/minor numbers in
serial drivers may conflict with each other. A typical scenario is
observed with amba-pl011 and samsung-uart drivers, both of these
drivers use same set of major/minor numbers. If both of these drivers
are enabled, probe of samsung-uart driver fails because the desired
node is busy.
The issue is fixed by adding a fallback in driver core, so that we can
use dynamic major number in case device node allocation fails for
hard-coded major/minor number.
Signed-off-by: Tushar Behera <tushar.behera(a)linaro.org>
---
Initial approach to fix this problem was by forcing samsung-uart driver
to use dynamic major number, but it was rejected [1] because of possible
user-space breakage. Current approach falls back to dynamic major
number as a fallback in case of failure.
[1] https://lkml.org/lkml/2013/12/27/2
Can I get an Acked-by/Reviewed-by before I send this to lkml?
Changes for V2:
* Added warning message in case major number is getting orverriden
drivers/tty/tty_io.c | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index c74a00a..ff4aada 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -3341,6 +3341,24 @@ int tty_register_driver(struct tty_driver *driver)
dev_t dev;
struct device *d;
+ if (driver->major) {
+ dev = MKDEV(driver->major, driver->minor_start);
+ error = register_chrdev_region(dev, driver->num, driver->name);
+ /* In case of error, fall back to dynamic allocation */
+ if (error < 0) {
+ printk(KERN_WARNING
+ "Default device node (%d:%d) for %s is busy, "
+ "using dynamic major number\n",
+ driver->major, driver->minor_start,
+ driver->name);
+ driver->major = 0;
+ }
+ }
+
+ /*
+ * Don't replace the following check with an else to above if statement,
+ * as it may also be called as a fallback.
+ */
if (!driver->major) {
error = alloc_chrdev_region(&dev, driver->minor_start,
driver->num, driver->name);
@@ -3348,9 +3366,6 @@ int tty_register_driver(struct tty_driver *driver)
driver->major = MAJOR(dev);
driver->minor_start = MINOR(dev);
}
- } else {
- dev = MKDEV(driver->major, driver->minor_start);
- error = register_chrdev_region(dev, driver->num, driver->name);
}
if (error < 0)
goto err;
--
1.7.9.5
Another round of minor tweaks
- Remove some problematic and controversial prints
- Pass cluster_id around as a pointer
- Move slab.h further back in the series
arm64: topology: Implement basic CPU topology support
arm64: topology: Add support for topology DT bindings
arm64: topology: Tell the scheduler about the relative
arm64: topology: Provide relative power numbers for cores
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 have been submitted elsewhere 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 (sections 3.11.1, 4.1, 5.2.9, at a minimum).
Changes for v6:
-- Allow selection of CONFIG_ACPI_REDUCED_HARDWARE_ONLY to be more
architecture-independent, but make it harder to accidentally enable.
-- Make sure that ACPI ECs do not use the ACPI global lock when in
hardware reduced mode (I had missed this case in earlier reviews
of the kernel tree).
Changes for v5:
-- Clarify that if the kernel config option to build ACPI hardware reduced
mode is used, it builds a hardware reduced *only* kernel (i.e., full
legacy ACPI mode will no longer work).
Changes for v4:
-- Given the current state of ACPICA, disable CONFIG_ACPI_REDUCED_HARDWARE
for use on anything other than ARM.
-- Replaced #ifdefs with run-time checking for hardware reduced mode,
whenever possible
Changes for v3:
-- Modified enabling ACPI_REDUCED_HARDWARE in ACPICA when using
kernel config item CONFIG_ACPI_REDUCED_HARDWARE; now consistent
with ACPICA code base where needed
-- Enable X86 for CONFIG_ACPI_REDUCED_HARDWARE
-- Minimize bus master reload patching
-- Remove unneeded patch for dmi_check_system() (was 4/6)
-- Correct the patch for removing unneeded map/unmap of FADT fields
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_ONLY to enforce 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: in HW reduced mode, using FADT PM information is not allowed.
ACPI: do not map/unmap memory regions for FADT entries in reduced HW
mode
ACPI: make sure ECs do not use the ACPI global lock
drivers/acpi/Kconfig | 12 ++++++++++++
drivers/acpi/bus.c | 30 ++++++++++++++++--------------
drivers/acpi/ec.c | 12 ++++++++++--
drivers/acpi/osl.c | 38 +++++++++++++++++++-------------------
drivers/acpi/pci_link.c | 2 ++
drivers/acpi/processor_idle.c | 14 ++++++++++++--
include/acpi/platform/aclinux.h | 6 ++++++
7 files changed, 77 insertions(+), 37 deletions(-)
--
1.8.4.2
From: Arnaldo Carvalho de Melo <acme(a)ghostprotocols.net>
Hi Ingo,
There are more patchkits outstanding that I have to revisit/retest, but
lets get this first batch in to keep pull reqs at a reasonable size.
Please consider pulling,
- Arnaldo
The following changes since commit 1341f3e4c0276aae3de6d902c9202265d89fe438:
Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core (2014-01-12 17:39:47 +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 26f7f9877234e6b9ed87eff4ca450631bafe0182:
perf tools: Remove unused test-volatile-register-var.c (2014-01-13 17:20:05 -0300)
----------------------------------------------------------------
New features:
. perf record: Add --initial-delay option (Andi Kleen)
. Column colouring improvements in 'diff' (Ramkumar Ramachandra)
Fixes:
. Don't show counter information when workload fails (Arnaldo Carvalho de Melo)
. Fixup leak on error path in parse events test. (Arnaldo Carvalho de Melo)
. Fix --delay option in 'stat' man page (Andi Kleen)
. Use the DWARF unwind info only if loaded (Jean Pihet):
Developer stuff:
. Improve forked workload error reporting by sending the errno in the signal
data queueing integer field, using sigqueue and by doing the signal setup in
the evlist methods, removing open coded equivalents in various tools. (Arnaldo Carvalho de Melo)
. Do more auto exit cleanup shores in the 'evlist' destructor, so that the tools
don't have to all do that sequence. (Arnaldo Carvalho de Melo)
. Pack 'struct perf_session_env' and 'struct trace' (Arnaldo Carvalho de Melo)
. Include tools/lib/api/ in MANIFEST, fixing detached tarballs (Arnaldo Carvalho de Melo)
. Add test for building detached source tarballs (Arnaldo Carvalho de Melo)
. Shut up libtracevent plugins make message (Jiri Olsa)
. Fix installation tests path setup (Jiri Olsa)
. Fix id_hdr_size initialization (Jiri Olsa)
. Move some header files from tools/perf/ to tools/include/ to make them available to
other tools/ dwelling codebases (Namhyung Kim)
. Fix 'probe' build when DWARF support libraries not present (Arnaldo Carvalho de Melo)
Refactorings:
. Move logic to warn about kptr_restrict'ed kernels to separate
function in 'report' (Arnaldo Carvalho de Melo)
. Move hist browser selection code to separate function (Arnaldo Carvalho de Melo)
. Move histogram entries collapsing to separate function (Arnaldo Carvalho de Melo)
. Introduce evlist__for_each() & friends (Arnaldo Carvalho de Melo)
. Automate setup of FEATURE_CHECK_(C|LD)FLAGS-all variables (Jiri Olsa)
. Move arch setup into seprate Makefile (Jiri Olsa)
Trivial stuff:
. Remove misplaced __maybe_unused in 'stat' (Arnaldo Carvalho de Melo)
. Remove old evsel_list usage in 'record' (Arnaldo Carvalho de Melo)
. Comment typo fix (Cody P Schafer)
. Remove unused test-volatile-register-var.c (Yann Droneaud)
Signed-off-by: Arnaldo Carvalho de Melo <acme(a)redhat.com>
----------------------------------------------------------------
Andi Kleen (2):
perf stat: Fix --delay option in man page
perf record: Add --initial-delay option
Arnaldo Carvalho de Melo (18):
perf stat: Don't show counter information when workload fails
perf evlist: Send the errno in the signal when workload fails
perf evlist: Move the SIGUSR1 error reporting logic to prepare_workload
perf record: Remove old evsel_list usage
perf evlist: Move destruction of maps to evlist destructor
perf evlist: Close fds on destructor
perf evlist: Auto unmap on destructor
perf tests: Fixup leak on error path in parse events test
perf stat: Remove misplaced __maybe_unused
perf header: Pack 'struct perf_session_env'
perf trace: Pack 'struct trace'
perf report: Move logic to warn about kptr_restrict'ed kernels to separate function
perf report: Move hist browser selection code to separate function
perf report: Move histogram entries collapsing to separate function
perf evlist: Introduce evlist__for_each() & friends
perf tools: Include tools/lib/api/ in MANIFEST
perf tools: Add test for building detached source tarballs
perf probe: Fix build when DWARF support libraries not present
Cody P Schafer (1):
tools perf: Comment typo fix
Jean Pihet (1):
perf tools: Use the DWARF unwind info only if loaded
Jiri Olsa (7):
perf tools: Move arch setup into seprate Makefile
perf tests: Fix installation tests path setup
tools lib traceevent: Replace tabs with spaces for all non-commands statements
tools lib traceevent: Shut up plugins make message
perf tools: Automate setup of FEATURE_CHECK_(C|LD)FLAGS-all variables
perf machine: Fix id_hdr_size initialization
perf tools: Make perf_event__synthesize_mmap_events global
Namhyung Kim (4):
tools include: Move perf's linux/compiler.h to a generic place
tools include: Define likely/unlikely in linux/compiler.h
tools include: Move perf's bug.h to a generic place
tools include: Include <linux/compiler.h> from asm/bug.h
Ramkumar Ramachandra (4):
perf tools: Generalize percent_color_snprintf()
perf diff: Color the Delta column
perf diff: Color the Ratio column
perf diff: Color the Weighted Diff column
Yann Droneaud (1):
perf tools: Remove unused test-volatile-register-var.c
tools/{perf/util => }/include/asm/bug.h | 9 +-
tools/{perf/util => }/include/linux/compiler.h | 12 +-
tools/lib/traceevent/Makefile | 59 ++++---
tools/perf/Documentation/perf-record.txt | 4 +
tools/perf/Documentation/perf-stat.txt | 2 +-
tools/perf/MANIFEST | 4 +-
tools/perf/Makefile.perf | 4 +-
tools/perf/builtin-annotate.c | 2 +-
tools/perf/builtin-diff.c | 98 ++++++++++-
tools/perf/builtin-evlist.c | 2 +-
tools/perf/builtin-inject.c | 2 +-
tools/perf/builtin-kvm.c | 6 +-
tools/perf/builtin-record.c | 82 +++++----
tools/perf/builtin-report.c | 192 ++++++++++++---------
tools/perf/builtin-script.c | 5 +-
tools/perf/builtin-stat.c | 66 ++++---
tools/perf/builtin-top.c | 14 +-
tools/perf/builtin-trace.c | 30 ++--
tools/perf/config/Makefile | 67 ++++---
tools/perf/config/Makefile.arch | 22 +++
.../feature-checks/test-volatile-register-var.c | 6 -
tools/perf/perf.h | 1 +
tools/perf/tests/code-reading.c | 7 +-
tools/perf/tests/evsel-roundtrip-name.c | 2 +-
tools/perf/tests/hists_link.c | 4 +-
tools/perf/tests/keep-tracking.c | 7 +-
tools/perf/tests/make | 40 +++--
tools/perf/tests/mmap-basic.c | 25 ++-
tools/perf/tests/open-syscall-tp-fields.c | 16 +-
tools/perf/tests/parse-events.c | 10 +-
tools/perf/tests/perf-record.c | 21 +--
tools/perf/tests/perf-targz-src-pkg | 21 +++
tools/perf/tests/perf-time-to-tsc.c | 6 -
tools/perf/tests/sw-clock.c | 18 +-
tools/perf/tests/task-exit.c | 33 ++--
tools/perf/ui/browsers/hists.c | 5 +-
tools/perf/ui/gtk/hists.c | 2 +-
tools/perf/util/cgroup.c | 4 +-
tools/perf/util/color.c | 15 +-
tools/perf/util/color.h | 1 +
tools/perf/util/event.c | 12 +-
tools/perf/util/event.h | 7 +
tools/perf/util/evlist.c | 78 +++++----
tools/perf/util/evlist.h | 69 +++++++-
tools/perf/util/evsel.c | 3 +-
tools/perf/util/header.c | 19 +-
tools/perf/util/header.h | 10 +-
tools/perf/util/machine.c | 1 +
tools/perf/util/parse-events.c | 5 +-
tools/perf/util/pmu.c | 2 +-
tools/perf/util/probe-event.c | 5 +-
tools/perf/util/python.c | 3 +-
tools/perf/util/record.c | 6 +-
tools/perf/util/session.c | 6 +-
tools/perf/util/unwind.c | 8 +-
55 files changed, 724 insertions(+), 436 deletions(-)
rename tools/{perf/util => }/include/asm/bug.h (81%)
rename tools/{perf/util => }/include/linux/compiler.h (64%)
create mode 100644 tools/perf/config/Makefile.arch
delete mode 100644 tools/perf/config/feature-checks/test-volatile-register-var.c
create mode 100755 tools/perf/tests/perf-targz-src-pkg