On 29 May 2013 13:40, Jan Glauber <jan.glauber(a)gmail.com> wrote:
> what's the status of suspend-to-disk on ARM? The most recent discussion I
> found is:
> http://lists.linuxfoundation.org/pipermail/linux-pm/2012-November/034997.ht…
>
> with no replies at all. Is anyone still working on that? Anyone got it running?
>
> I tried the patch above (on top of LTS 3.4) and got stuck forever, the last
> thing on the console was:
>
> root@omap5:/sys/power# echo disk > state
> [ 2015.641540] PM: Syncing filesystems ... done.
> [ 2015.666870] PM: Preallocating image memory... done (allocated 16957 pages)
> [ 2016.062011] PM: Allocated 67828 kbytes in 0.38 seconds (178.49 MB/s)
>
> Any hint how to debug that?
I know it is still broken and I had discussion with Kevin in past
regarding that. See below.
On 13 March 2013 22:57, Kevin Hilman <khilman(a)linaro.org> wrote:
> Viresh Kumar <viresh.kumar(a)linaro.org> writes:
>
>> Hi Guys,
>>
>> As discussed during connect about "HIBERNATION support for ARM platforms",
>> this is my last mail on this, almost a year back, where i tried my best to get
>> relevant answer from Amit.
>>
>> Probably he missed all my mails then, but this might be a good starting point
>> for this discussion as i did some testing on hibernation earlier.
>>
>> https://lkml.org/lkml/2012/2/6/8
>
> I think the reason that ARM sub-arches are not setting things up is
> because ARM has never supported hibernation in mainline.
>
> The most recent patch to add basic support[1] references the various
> discussions on what is needed and still missing.
>
> Kevin
>
> [1] http://marc.info/?l=linux-omap&m=135292458209355&w=2
Each governor is suitable for different kernel configurations: the menu
governor suits better for a tickless system, while the ladder governor fits
better for a periodic timer tick system.
The Kconfig does not allow to [un]select a governor, thus both are compiled in
the kernel but the init order makes the menu governor to be the last one to be
registered, so becoming the default. The only way to switch back to the ladder
governor is to enable the sysfs governor switch in the kernel command line.
Because it seems nobody complained about this, the menu governor is used by
default most of the time on the system, having both governors is not really
necessary on a tickless system but there isn't a config option to disable one
or another governor.
Create a submenu for cpuidle and add a label for each governor, so we can see
the option in the menu config and enable/disable it.
The governors will be enabled depending on the CONFIG_NO_HZ option:
- If CONFIG_NO_HZ is set, then the menu governor is selected and the ladder
governor is optional, defaulting to 'no'
- If CONFIG_NO_HZ is not set, then the ladder governor is selected and the
menu governor is optional, defaulting to 'no'
Signed-off-by: Daniel Lezcano <daniel.lezcano(a)linaro.org>
---
drivers/cpuidle/Kconfig | 20 +++++++++-----------
1 file changed, 9 insertions(+), 11 deletions(-)
diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig
index c4cc27e..90c2f39 100644
--- a/drivers/cpuidle/Kconfig
+++ b/drivers/cpuidle/Kconfig
@@ -1,7 +1,9 @@
-config CPU_IDLE
+menuconfig CPU_IDLE
bool "CPU idle PM support"
default y if ACPI || PPC_PSERIES
+ select CPU_IDLE_GOV_LADDER if (!NO_HZ && !NO_HZ_IDLE)
+ select CPU_IDLE_GOV_MENU if (NO_HZ || NO_HZ_IDLE)
help
CPU idle is a generic framework for supporting software-controlled
idle processor power management. It includes modular cross-platform
@@ -9,9 +11,10 @@ config CPU_IDLE
If you're using an ACPI-enabled platform, you should say Y here.
+if CPU_IDLE
+
config CPU_IDLE_MULTIPLE_DRIVERS
bool "Support multiple cpuidle drivers"
- depends on CPU_IDLE
default n
help
Allows the cpuidle framework to use different drivers for each CPU.
@@ -19,24 +22,19 @@ config CPU_IDLE_MULTIPLE_DRIVERS
states. If unsure say N.
config CPU_IDLE_GOV_LADDER
- bool
- depends on CPU_IDLE
- default y
+ bool "Ladder governor (for periodic timer tick)"
+ default n if (NO_HZ || NO_HZ_IDLE)
config CPU_IDLE_GOV_MENU
- bool
- depends on CPU_IDLE && NO_HZ
- default y
+ bool "Menu governor (for tickless system)"
+ default n if (!NO_HZ && !NO_HZ_IDLE)
config ARCH_NEEDS_CPU_IDLE_COUPLED
def_bool n
-if CPU_IDLE
-
config CPU_IDLE_CALXEDA
bool "CPU Idle Driver for Calxeda processors"
depends on ARCH_HIGHBANK
help
Select this to enable cpuidle on Calxeda processors.
-
endif
--
1.7.9.5
This patch adds support for defining and passing earlyprintk
related information i.e. device and address information via
device tree by adding it inside "chosen" node.
This will help user to just specify "earlyprintk" from bootargs
without actually knowing the address and device to enable
earlyprintk.
Mechanism:
One can just append earlyprintk=device-type,address (same as we pass
through command line) in "/chosen" node to notify kernel which is the
earlyprintk device and what is its address.
Backward Compatibility:
This patch also allows existing method of specifying earlyprintk
parameter via bootargs.
Existing method i.e. passing via bootargs will still have precedence
over device tree i.e. if one specifies earlyprintk=device-type,address
in bootargs then kernel will use information from bootargs instead of
device tree.
If user just specifies earlyprintk (without =...) then kernel will
look for device tree earlyprintk parameter.
Signed-off-by: Pranavkumar Sawargaonkar <pranavkumar(a)linaro.org>
Signed-off-by: Anup Patel <anup.patel(a)linaro.org>
---
arch/arm64/kernel/early_printk.c | 7 +++++++
arch/arm64/kernel/setup.c | 22 +++++++++++++++++++++-
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/early_printk.c b/arch/arm64/kernel/early_printk.c
index fbb6e18..4e6f845 100644
--- a/arch/arm64/kernel/early_printk.c
+++ b/arch/arm64/kernel/early_printk.c
@@ -29,6 +29,8 @@
static void __iomem *early_base;
static void (*printch)(char ch);
+extern char *earlyprintk_dt_args;
+
/*
* PL011 single character TX.
*/
@@ -116,6 +118,11 @@ static int __init setup_early_printk(char *buf)
phys_addr_t paddr = 0;
if (!buf) {
+ /* Try to check if Device Tree has this argument or not ? */
+ buf = earlyprintk_dt_args;
+ }
+
+ if (!buf) {
pr_warning("No earlyprintk arguments passed.\n");
return 0;
}
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index 6a9a532..94ce7a9 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -60,6 +60,9 @@ EXPORT_SYMBOL(processor_id);
unsigned int elf_hwcap __read_mostly;
EXPORT_SYMBOL_GPL(elf_hwcap);
+char *earlyprintk_dt_args;
+EXPORT_SYMBOL_GPL(earlyprintk_dt_args);
+
static const char *cpu_name;
static const char *machine_name;
phys_addr_t __fdt_pointer __initdata;
@@ -122,6 +125,23 @@ static void __init setup_processor(void)
elf_hwcap = 0;
}
+int __init early_init_dt_scan_chosen_arm64(unsigned long node,
+ const char *uname,
+ int depth, void *data)
+{
+ char *prop;
+
+ /* Check if this is chosen node */
+ if (early_init_dt_scan_chosen(node, uname, depth, data) == 0)
+ return 0;
+
+ prop = of_get_flat_dt_prop(node, "earlyprintk", NULL);
+ if (prop)
+ earlyprintk_dt_args = prop;
+
+ return 1;
+}
+
static void __init setup_machine_fdt(phys_addr_t dt_phys)
{
struct boot_param_header *devtree;
@@ -165,7 +185,7 @@ static void __init setup_machine_fdt(phys_addr_t dt_phys)
pr_info("Machine: %s\n", machine_name);
/* Retrieve various information from the /chosen node */
- of_scan_flat_dt(early_init_dt_scan_chosen, boot_command_line);
+ of_scan_flat_dt(early_init_dt_scan_chosen_arm64, boot_command_line);
/* Initialize {size,address}-cells info */
of_scan_flat_dt(early_init_dt_scan_root, NULL);
/* Setup memory, calling early_init_dt_add_memory_arch */
--
1.7.9.5
Each governor is suitable for different kernel configurations: the menu
governor suits better for a tickless system, while the ladder governor fits
better for a periodic timer tick system.
The Kconfig does not allow to [un]select a governor, thus both are compiled in
the kernel but the init order makes the menu governor to be the last one to be
registered, so becoming the default. The only way to switch back to the ladder
governor is to enable the sysfs governor switch in the kernel command line.
Because it seems nobody complained about this, the menu governor is used by
default most of the time on the system, having both governors is not really
necessary on a tickless system but there isn't a config option to disable one
or another governor.
Create a submenu for cpuidle and add a label for each governor, so we can see
the option in the menu config and enable/disable it.
The governors will be enabled depending on the CONFIG_NO_HZ option:
- If CONFIG_NO_HZ is set, then the menu governor is selected and the ladder
governor is optional, defaulting to 'yes'
- If CONFIG_NO_HZ is not set, then the ladder governor is selected and the
menu governor is optional, defaulting to 'yes'
Signed-off-by: Daniel Lezcano <daniel.lezcano(a)linaro.org>
---
drivers/cpuidle/Kconfig | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig
index c4cc27e..e997f15 100644
--- a/drivers/cpuidle/Kconfig
+++ b/drivers/cpuidle/Kconfig
@@ -1,7 +1,9 @@
-config CPU_IDLE
+menuconfig CPU_IDLE
bool "CPU idle PM support"
default y if ACPI || PPC_PSERIES
+ select CPU_IDLE_GOV_LADDER if (!NO_HZ && !NO_HZ_IDLE)
+ select CPU_IDLE_GOV_MENU if (NO_HZ || NO_HZ_IDLE)
help
CPU idle is a generic framework for supporting software-controlled
idle processor power management. It includes modular cross-platform
@@ -9,9 +11,10 @@ config CPU_IDLE
If you're using an ACPI-enabled platform, you should say Y here.
+if CPU_IDLE
+
config CPU_IDLE_MULTIPLE_DRIVERS
bool "Support multiple cpuidle drivers"
- depends on CPU_IDLE
default n
help
Allows the cpuidle framework to use different drivers for each CPU.
@@ -19,24 +22,19 @@ config CPU_IDLE_MULTIPLE_DRIVERS
states. If unsure say N.
config CPU_IDLE_GOV_LADDER
- bool
- depends on CPU_IDLE
+ bool "Ladder governor (for periodic timer tick)"
default y
config CPU_IDLE_GOV_MENU
- bool
- depends on CPU_IDLE && NO_HZ
+ bool "Menu governor (for tickless system)"
default y
config ARCH_NEEDS_CPU_IDLE_COUPLED
def_bool n
-if CPU_IDLE
-
config CPU_IDLE_CALXEDA
bool "CPU Idle Driver for Calxeda processors"
depends on ARCH_HIGHBANK
help
Select this to enable cpuidle on Calxeda processors.
-
endif
--
1.7.9.5
=== Highlights ===
* Had a good call with Arnd, Jesse, Serban and Rebecca on issues facing
upstreaming ION
* Refactored the ION patchset trying to simplify things a bit, sent out
draft to Jesse, Arnd and Serban
* *Finally* got around to finishing and posting my writeup on earlysuspend
https://plus.google.com/u/0/111524780435806926688/posts/RCV8EP3hFEm
* Responded to community questions from my lsf-mm summary.
* Sent the patch "Revert ARM: Make low-level printk work" patch to AOSP,
not sure if Arve will merge it.
* Reviewed Dmitry's VFAT_GET_VOLUME_ID patches
* Reviewed blueprints and sent out weekly Android upstreaming sub-team
status
* Lots of time reviewing the ION code to better understand current
issues prior to meeting.
=== Plans ===
* Get through the pending patches in my inbox and queue them for upstream
* More work on refactoring the ION patchset and addressing some of the
bigger issues from our discussion.
* Get back to Minchan on some of his private volatile range questions
=== Issues ===
* One of my git.linaro.org repos had some strange permission changes on
some of the objects, which is keeping me from being able to push changes
out. Filed an IT ticket
== Linus Walleij linusw ==
=== Highlights ===
* Collected and prepared a set of pinctrl fixes and sent
pull request to Torvalds. He pulled them in.
* Collected and prepared a set of GPIO fixes and sent
pull request to Torvalds. He pulled them in.
* Continued to apply DMA40 patches from Lee on a
specific DMA40 branch targeted for ARM SoC. Prepared
a first pull request with the first set of Lee's patches
after Vinod and Herbert ACKed them.
* Reviewed lots of pinctrl code, and some GPIO code.
* Prepared and sent a clocks-to-devicetree patch set for
the U300. (Tying up the sack on U300.) This is now
under review.
* Sent a pull request for the queued patches to move
Nomadik to use device tree for the clocks.
* Fixed ethernet to work in Nomadik S8815.
* Poked around with Nomadik S8815 user LED, and
user key using the standard GPIO bindings.
* Converted Nomadik to use DT for pin control.
* Asked for a NHK15 board to fix the support for this
board as well.
* Being pleased with Lee & Fabio taking on ever more
complex tasks and doing a good job overall for ux500.
=== Plans ===
* Finalize U300 DT+multiplatform patch set. Maybe send
a partial pull request with the stuff I have.
* Integrate Integrator PCI patch set, then start to delete
board files and convert to multiplatform.
* Convert Nomadik pinctrl driver to register GPIO ranges
from the gpiochip side.
* Test the PL08x patches on the Ericsson Research
PB11MPCore and submit platform data for using
pl08x DMA on that platform.
* Get hands dirty with regmap.
=== Issues ===
* Subsystem maintainers in the kernel community are forced
to act as standardization comittee for device tree bindings
due to lack of review power. As they have to merge the
bindings in the end, reviewing fall upward to the subsystem
maintainers, this is something of a workload issue.
* Need a PCI branch at ARM SoC to request Integrator PCI
DT patches to be pulled into. (Still blocked on this for
Integrator single zImage.)
* Some impediments from internal turmoil @ST-Ericsson.
Thanks,
Linus Walleij
This patch series does the following:
1) Factors out possible common code, unifies the clk strutures used
for PLL35XX & PLL36XX and usues clk->base instead of clk->con0
2) Defines a common rate_table which will contain recommended p, m, s and k
values for supported rates that needs to be changed for changing
corresponding PLL's rate
3) Adds set_rate() and round_rate() clk_ops for PLL35XX and PLL36XXX
Is rebased on branch kgene's "for-next"
https://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/log/?h…
And tested these patch on chromebook for EPLL settings for Audio on our chrome tree.
Vikas Sajjan (2):
clk: samsung: Add set_rate() clk_ops for PLL36XX
clk: samsung: Add EPLL and VPLL freq table for exynos5250 SoC
Yadwinder Singh Brar (3):
clk: samsung: Use clk->base instead of directly using clk->con0 for
PLL3XXX
clk: samsung: Add support to register rate_table for PLL3XXX
clk: samsung: Add set_rate() clk_ops for PLL35XX
drivers/clk/samsung/clk-exynos4.c | 10 +-
drivers/clk/samsung/clk-exynos5250.c | 29 +++-
drivers/clk/samsung/clk-pll.c | 243 ++++++++++++++++++++++++++++++----
drivers/clk/samsung/clk-pll.h | 27 +++-
4 files changed, 272 insertions(+), 37 deletions(-)
--
1.7.9.5
Hi,
This patchset takes advantage of the new per-task load tracking that is
available in the kernel for packing the tasks in as few as possible
CPU/Cluster/Core. It has got 2 packing modes:
-The 1st mode packs the small tasks when the system is not too busy. The main
goal is to reduce the power consumption in the low system load use cases by
minimizing the number of power domain that are enabled but it also keeps the
default behavior which is performance oriented.
-The 2nd mode packs all tasks in as few as possible power domains in order to
improve the power consumption of the system but at the cost of possible
performance decrease because of the increase of the rate of ressources sharing
compared to the default mode.
The packing is done in 3 steps (the last step is only applicable for the
agressive packing mode):
The 1st step looks for the best place to pack tasks in a system according to
its topology and it defines a 1st pack buddy CPU for each CPU if there is one
available. The policy for defining a buddy CPU is that we want to pack at
levels where a group of CPU can be power gated independently from others. To
describe this capability, a new flag SD_SHARE_POWERDOMAIN has been introduced,
that is used to indicate whether the groups of CPUs of a scheduling domain
share their power state. By default, this flag is set in all sched_domain in
order to keep unchanged the current behavior of the scheduler and only ARM
platform clears the SD_SHARE_POWERDOMAIN flag for MC and CPU level.
In a 2nd step, the scheduler checks the load average of a task which wakes up
as well as the load average of the buddy CPU and it can decide to migrate the
light tasks on a not busy buddy. This check is done during the wake up because
small tasks tend to wake up between periodic load balance and asynchronously
to each other which prevents the default mechanism to catch and migrate them
efficiently. A light task is defined by a runnable_avg_sum that is less than
20% of the runnable_avg_period. In fact, the former condition encloses 2 ones:
The average CPU load of the task must be less than 20% and the task must have
been runnable less than 10ms when it woke up last time in order to be
electable for the packing migration. So, a task than runs 1 ms each 5ms will
be considered as a small task but a task that runs 50 ms with a period of
500ms, will not.
Then, the business of the buddy CPU depends of the load average for the rq and
the number of running tasks. A CPU with a load average greater than 50% will
be considered as busy CPU whatever the number of running tasks is and this
threshold will be reduced by the number of running tasks in order to not
increase too much the wake up latency of a task. When the buddy CPU is busy,
the scheduler falls back to default CFS policy.
The 3rd step is only used when the agressive packing mode is enable. In this
case, the CPUs pack their tasks in their buddy until they becomes full. Unlike
the previous step, we can't keep the same buddy so we update it during load
balance. During the periodic load balance, the scheduler computes the activity
of the system thanks the runnable_avg_sum and the cpu_power of all CPUs and
then it defines the CPUs that will be used to handle the current activity. The
selected CPUs will be their own buddy and will participate to the default
load balancing mecanism in order to share the tasks in a fair way, whereas the
not selected CPUs will not, and their buddy will be the last selected CPU.
The behavior can be summarized as: The scheduler defines how many CPUs are
required to handle the current activity, keeps the tasks on these CPUS and
perform normal load balancing (or any evolution of the current load balancer
like the use of runnable load avg from Alex https://lkml.org/lkml/2013/4/1/580)
on this limited number of CPUs . Like the other steps, the CPUs are selected to
minimize the number of power domain that must stay on.
Change since V3:
- Take into account comments on previous version.
- Add an agressive packing mode and a knob to select between the various mode
Change since V2:
- Migrate only a task that wakes up
- Change the light tasks threshold to 20%
- Change the loaded CPU threshold to not pull tasks if the current number of
running tasks is null but the load average is already greater than 50%
- Fix the algorithm for selecting the buddy CPU.
Change since V1:
Patch 2/6
- Change the flag name which was not clear. The new name is
SD_SHARE_POWERDOMAIN.
- Create an architecture dependent function to tune the sched_domain flags
Patch 3/6
- Fix issues in the algorithm that looks for the best buddy CPU
- Use pr_debug instead of pr_info
- Fix for uniprocessor
Patch 4/6
- Remove the use of usage_avg_sum which has not been merged
Patch 5/6
- Change the way the coherency of runnable_avg_sum and runnable_avg_period is
ensured
Patch 6/6
- Use the arch dependent function to set/clear SD_SHARE_POWERDOMAIN for ARM
platform
Previous results for v3:
This series has been tested with hackbench on ARM platform and the results
don't show any performance regression
Hackbench 3.9-rc2 +patches
Mean Time (10 tests): 2.048 2.015
stdev : 0.047 0.068
Previous results for V2:
This series has been tested with MP3 play back on ARM platform:
TC2 HMP (dual CA-15 and 3xCA-7 cluster).
The measurements have been done on an Ubuntu image during 60 seconds of
playback and the result has been normalized to 100.
| CA15 | CA7 | total |
-------------------------------------
default | 81 | 97 | 178 |
pack | 13 | 100 | 113 |
-------------------------------------
Previous results for V1:
The patch-set has been tested on ARM platforms: quad CA-9 SMP and TC2 HMP
(dual CA-15 and 3xCA-7 cluster). For ARM platform, the results have
demonstrated that it's worth packing small tasks at all topology levels.
The performance tests have been done on both platforms with sysbench. The
results don't show any performance regressions. These results are aligned with
the policy which uses the normal behavior with heavy use cases.
test: sysbench --test=cpu --num-threads=N --max-requests=R run
Results below is the average duration of 3 tests on the quad CA-9.
default is the current scheduler behavior (pack buddy CPU is -1)
pack is the scheduler with the pack mechanism
| default | pack |
-----------------------------------
N=8; R=200 | 3.1999 | 3.1921 |
N=8; R=2000 | 31.4939 | 31.4844 |
N=12; R=200 | 3.2043 | 3.2084 |
N=12; R=2000 | 31.4897 | 31.4831 |
N=16; R=200 | 3.1774 | 3.1824 |
N=16; R=2000 | 31.4899 | 31.4897 |
-----------------------------------
The power consumption tests have been done only on TC2 platform which has got
accessible power lines and I have used cyclictest to simulate small tasks. The
tests show some power consumption improvements.
test: cyclictest -t 8 -q -e 1000000 -D 20 & cyclictest -t 8 -q -e 1000000 -D 20
The measurements have been done during 16 seconds and the result has been
normalized to 100
| CA15 | CA7 | total |
-------------------------------------
default | 100 | 40 | 140 |
pack | <1 | 45 | <46 |
-------------------------------------
The A15 cluster is less power efficient than the A7 cluster but if we assume
that the tasks is well spread on both clusters, we can guest estimate that the
power consumption on a dual cluster of CA7 would have been for a default
kernel:
| CA7 | CA7 | total |
-------------------------------------
default | 40 | 40 | 80 |
-------------------------------------
Vincent Guittot (14):
Revert "sched: Introduce temporary FAIR_GROUP_SCHED dependency for
load-tracking"
sched: add a new SD_SHARE_POWERDOMAIN flag for sched_domain
sched: pack small tasks
sched: pack the idle load balance
ARM: sched: clear SD_SHARE_POWERDOMAIN
sched: add a knob to choose the packing level
sched: agressively pack at wake/fork/exec
sched: trig ILB on an idle buddy
sched: evaluate the activity level of the system
sched: update the buddy CPU
sched: filter task pull request
sched: create a new field with available capacity
sched: update the cpu_power
sched: force migration on buddy CPU
arch/arm/kernel/topology.c | 9 +
arch/ia64/include/asm/topology.h | 1 +
arch/tile/include/asm/topology.h | 1 +
include/linux/sched.h | 11 +-
include/linux/sched/sysctl.h | 8 +
include/linux/topology.h | 4 +
kernel/sched/core.c | 14 +-
kernel/sched/fair.c | 393 +++++++++++++++++++++++++++++++++++---
kernel/sched/sched.h | 15 +-
kernel/sysctl.c | 13 ++
10 files changed, 423 insertions(+), 46 deletions(-)
--
1.7.9.5
Add a source file xor-neon.c (which is really just the reference
C implementation passed through the GCC vectorizer) and hook it
up to the XOR framework.
Output captured from a Cortex-A15 @ 1.7 GHz:
xor: measuring software checksum speed
arm4regs : 2261.600 MB/sec
8regs : 1771.600 MB/sec
32regs : 1441.600 MB/sec
neon : 3619.600 MB/sec
xor: using function: neon (3619.600 MB/sec)
As the xor_blocks() function could potentially be called from
interrupt context, this implementation checks for that and
reverts to the plain ARM code in that case.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
Cc: Rob Herring <rob.herring(a)calxeda.com>
---
This is the first of a series of three patches that I have
prepared that use the NEON/VFP unit in the kernel. This one
does not use NEON code explicitly, but relies on the compiler
to generate it. The NEON code is kept in a separate compilation
unit to make absolutely sure that none of it ever gets executed
from outside a kernel_vfp_begin()/kernel_vfp_end() pair.
I have additional patches (which I will circulate later) for doing:
- RAID-6 syndrome calculations using NEON instrinsics
- bit sliced AES using NEON assembler (.S file)
This way, we have a sample of each of the various ways NEON can be
used in the kernel, and others looking to do the same can use any
of these as an example.
This patch depends on my earlier patch that implements
kernel_vfp_begin() and kernel_vfp_end()
--
Ard.
arch/arm/include/asm/xor.h | 74 ++++++++++++++++++++++++++++++++++++++++++++++
arch/arm/lib/Makefile | 5 ++++
arch/arm/lib/xor-neon.c | 31 +++++++++++++++++++
3 files changed, 110 insertions(+)
create mode 100644 arch/arm/lib/xor-neon.c
diff --git a/arch/arm/include/asm/xor.h b/arch/arm/include/asm/xor.h
index 7604673..64c4a15 100644
--- a/arch/arm/include/asm/xor.h
+++ b/arch/arm/include/asm/xor.h
@@ -7,7 +7,10 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
+#include <linux/hardirq.h>
#include <asm-generic/xor.h>
+#include <asm/hwcap.h>
+#include <asm/vfp.h>
#define __XOR(a1, a2) a1 ^= a2
@@ -138,4 +141,75 @@ static struct xor_block_template xor_block_arm4regs = {
xor_speed(&xor_block_arm4regs); \
xor_speed(&xor_block_8regs); \
xor_speed(&xor_block_32regs); \
+ NEON_TEMPLATES; \
} while (0)
+
+#ifdef CONFIG_NEON
+
+extern struct xor_block_template const xor_block_neon_inner;
+
+static void
+xor_neon_2(unsigned long bytes, unsigned long *p1, unsigned long *p2)
+{
+ if (in_interrupt()) {
+ xor_arm4regs_2(bytes, p1, p2);
+ } else {
+ kernel_vfp_begin();
+ xor_block_neon_inner.do_2(bytes, p1, p2);
+ kernel_vfp_end();
+ }
+}
+
+static void
+xor_neon_3(unsigned long bytes, unsigned long *p1, unsigned long *p2,
+ unsigned long *p3)
+{
+ if (in_interrupt()) {
+ xor_arm4regs_3(bytes, p1, p2, p3);
+ } else {
+ kernel_vfp_begin();
+ xor_block_neon_inner.do_3(bytes, p1, p2, p3);
+ kernel_vfp_end();
+ }
+}
+
+static void
+xor_neon_4(unsigned long bytes, unsigned long *p1, unsigned long *p2,
+ unsigned long *p3, unsigned long *p4)
+{
+ if (in_interrupt()) {
+ xor_arm4regs_4(bytes, p1, p2, p3, p4);
+ } else {
+ kernel_vfp_begin();
+ xor_block_neon_inner.do_4(bytes, p1, p2, p3, p4);
+ kernel_vfp_end();
+ }
+}
+
+static void
+xor_neon_5(unsigned long bytes, unsigned long *p1, unsigned long *p2,
+ unsigned long *p3, unsigned long *p4, unsigned long *p5)
+{
+ if (in_interrupt()) {
+ xor_arm4regs_5(bytes, p1, p2, p3, p4, p5);
+ } else {
+ kernel_vfp_begin();
+ xor_block_neon_inner.do_5(bytes, p1, p2, p3, p4, p5);
+ kernel_vfp_end();
+ }
+}
+
+static struct xor_block_template xor_block_neon = {
+ .name = "neon",
+ .do_2 = xor_neon_2,
+ .do_3 = xor_neon_3,
+ .do_4 = xor_neon_4,
+ .do_5 = xor_neon_5
+};
+
+#define NEON_TEMPLATES \
+ do { if (elf_hwcap & HWCAP_NEON) xor_speed(&xor_block_neon); } while (0)
+#else
+#define NEON_TEMPLATES
+#error
+#endif
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index af72969..1951766 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -45,3 +45,8 @@ lib-$(CONFIG_ARCH_SHARK) += io-shark.o
$(obj)/csumpartialcopy.o: $(obj)/csumpartialcopygeneric.S
$(obj)/csumpartialcopyuser.o: $(obj)/csumpartialcopygeneric.S
+
+ifeq ($(CONFIG_NEON),y)
+ CFLAGS_xor-neon.o += -mfloat-abi=softfp -mfpu=neon
+ lib-$(CONFIG_XOR_BLOCKS) += xor-neon.o
+endif
diff --git a/arch/arm/lib/xor-neon.c b/arch/arm/lib/xor-neon.c
new file mode 100644
index 0000000..159beaf
--- /dev/null
+++ b/arch/arm/lib/xor-neon.c
@@ -0,0 +1,31 @@
+/*
+ * linux/arch/arm/lib/xor-neon.c
+ *
+ * Copyright (C) 2013 Linaro Ltd <ard.biesheuvel(a)linaro.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/raid/xor.h>
+
+#ifndef __ARM_NEON__
+#error You should compile this file with '-mfloat-abi=softfp -mfpu=neon'
+#endif
+
+/*
+ * Pull in the reference implementations while instructing GCC to attempt to
+ * exploit implicit parallelism and emit NEON instructions.
+ */
+#pragma GCC optimize "tree-vectorize"
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#include <asm-generic/xor.h>
+
+struct xor_block_template const xor_block_neon_inner = {
+ .name = "__inner_neon__",
+ .do_2 = xor_8regs_2,
+ .do_3 = xor_8regs_3,
+ .do_4 = xor_8regs_4,
+ .do_5 = xor_8regs_5,
+};
--
1.8.1.2
hi
When i download the
git.linaro.org/git-ro/landing-teams/working/arm/kernel.git, there are
branches relates to gator.
I set up the enviroment at TC2 with gator and Dstream. I want to show
the CPU frequencies of big and little clusters, so i add code in gator
to get the frequency of the clusters. But it seems that gator wakes
up in period and send out the message. So is there any way that make
gator to wake up based on events of cpu frequency changing, and send
out the message to Dstream?
The GCC support header for NEON intrinsics <arm_neon.h> cannot be
included directly due to its dependency on <stdint.h>.
Add a header <asm/neon.h> that checks/tweaks the environment so
<arm_neon.h> can be included without problems.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
---
arch/arm/include/asm/neon.h | 44 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 44 insertions(+)
create mode 100644 arch/arm/include/asm/neon.h
diff --git a/arch/arm/include/asm/neon.h b/arch/arm/include/asm/neon.h
new file mode 100644
index 0000000..0f76dc3
--- /dev/null
+++ b/arch/arm/include/asm/neon.h
@@ -0,0 +1,44 @@
+/*
+ * linux/arch/arm/include/asm/neon.h
+ *
+ * Copyright (C) 2013 Linaro Ltd <ard.biesheuvel(a)linaro.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef _ASM_NEON_H
+#define _ASM_NEON_H
+
+/*
+ * The GCC support header file for NEON intrinsics, <arm_neon.h>, does an
+ * unconditional #include of <stdint.h>, assuming it will never be used outside
+ * a C99 conformant environment. Sadly, this is not the case for the kernel.
+ * The only dependencies <arm_neon.h> has on <stdint.h> are the
+ * uint[8|16|32|64]_t types, which the kernel defines in <linux/types.h>.
+ */
+#include <linux/types.h>
+
+/*
+ * The GCC option -ffreestanding prevents GCC's internal <stdint.h> from
+ * including the <stdint.h> system header, it will #include "stdint-gcc.h"
+ * instead.
+ */
+#if __STDC_HOSTED__ != 0
+#error You must compile with -ffreestanding to use NEON intrinsics
+#endif
+
+/*
+ * The type uintptr_t is typedef'ed to __UINTPTR_TYPE__ by "stdint-gcc.h".
+ * However, the bare metal and GLIBC versions of GCC don't agree on the
+ * definition of __UINTPTR_TYPE__. Bare metal agrees with the kernel
+ * (unsigned long), but GCC for GLIBC uses 'unsigned int' instead.
+ */
+#ifdef __linux__
+#undef __UINTPTR_TYPE__
+#endif
+
+#include <arm_neon.h>
+
+#endif
--
1.8.1.2
Hi,
There is a build failure for STE Snowball on "linux-arm-soc-for-next"
branch in Linaro Kernel CI system:
https://ci.linaro.org/jenkins/job/linux-arm-soc-for-next/hwpack=snowball,la…
which is caused by:
01:31:32
/mnt/ci_build/workspace/linux-arm-soc-for-next/hwpack/snowball/label/kernel_cloud/drivers/mfd/ab8500-debugfs.c:95:23:
fatal error: mach/irqs.h: No such file or directory
01:31:32 #include <mach/irqs.h>
01:31:32 ^
01:31:32 compilation terminated.
01:31:32 make[3]: *** [drivers/mfd/ab8500-debugfs.o] Error 1
01:31:32 make[2]: *** [drivers/mfd] Error 2
01:31:32 make[1]: *** [drivers] Error 2
To solve this issue, here is the patch which Linux Walleij provided on 11
April 2013:
https://lkml.org/lkml/2013/4/11/101
Would anyone like to merge the patch to fix this compiling error?
Thank you in advance for your efforts!
Best Regards
Botao Sun
Commit bf4d1b5ddb78f86078ac6ae0415802d5f0c68f92 brought the multiple driver
support. The code added a couple of new API to register the driver per cpu.
That led to some code complexity to handle the kernel config options when
the multiple driver support is enabled or not, which is not really necessary.
The code has to be compatible when the multiple driver support is not enabled,
and the multiple driver support has to be compatible with the old api.
This patch removes this API, which is not yet used by any driver but needed
for the HMP cpuidle drivers which will come soon, and replaces its usage
by a cpumask pointer in the cpuidle driver structure telling what cpus are
handled by the driver. That let the API cpuidle_[un]register_driver to be used
for the multipled driver support and also the cpuidle_[un]register functions,
added recently in the cpuidle framework.
The current code, a bit poor in comments, has been commented and simplified.
Signed-off-by: Daniel Lezcano <daniel.lezcano(a)linaro.org>
---
drivers/cpuidle/cpuidle.c | 4 +-
drivers/cpuidle/driver.c | 325 ++++++++++++++++++++++++++++-----------------
include/linux/cpuidle.h | 21 +--
3 files changed, 214 insertions(+), 136 deletions(-)
diff --git a/drivers/cpuidle/cpuidle.c b/drivers/cpuidle/cpuidle.c
index c3a93fe..fdc432f 100644
--- a/drivers/cpuidle/cpuidle.c
+++ b/drivers/cpuidle/cpuidle.c
@@ -466,7 +466,7 @@ void cpuidle_unregister(struct cpuidle_driver *drv)
int cpu;
struct cpuidle_device *device;
- for_each_possible_cpu(cpu) {
+ for_each_cpu(cpu, drv->cpumask) {
device = &per_cpu(cpuidle_dev, cpu);
cpuidle_unregister_device(device);
}
@@ -498,7 +498,7 @@ int cpuidle_register(struct cpuidle_driver *drv,
return ret;
}
- for_each_possible_cpu(cpu) {
+ for_each_cpu(cpu, drv->cpumask) {
device = &per_cpu(cpuidle_dev, cpu);
device->cpu = cpu;
diff --git a/drivers/cpuidle/driver.c b/drivers/cpuidle/driver.c
index 8dfaaae..3a447a4 100644
--- a/drivers/cpuidle/driver.c
+++ b/drivers/cpuidle/driver.c
@@ -18,206 +18,267 @@
DEFINE_SPINLOCK(cpuidle_driver_lock);
-static void __cpuidle_set_cpu_driver(struct cpuidle_driver *drv, int cpu);
-static struct cpuidle_driver * __cpuidle_get_cpu_driver(int cpu);
+#ifdef CONFIG_CPU_IDLE_MULTIPLE_DRIVERS
-static void cpuidle_setup_broadcast_timer(void *arg)
+static DEFINE_PER_CPU(struct cpuidle_driver *, cpuidle_drivers);
+
+/**
+ * __cpuidle_get_cpu_driver: returns the cpuidle driver tied with the specified
+ * cpu.
+ *
+ * @cpu: an integer specifying the cpu number
+ *
+ * Returns a pointer to struct cpuidle_driver, NULL if no driver has been
+ * registered for this driver
+ */
+static struct cpuidle_driver *__cpuidle_get_cpu_driver(int cpu)
{
- int cpu = smp_processor_id();
- clockevents_notify((long)(arg), &cpu);
+ return per_cpu(cpuidle_drivers, cpu);
}
-static void __cpuidle_driver_init(struct cpuidle_driver *drv, int cpu)
+/**
+ * __cpuidle_set_driver: assign to the per cpu variable the driver pointer for
+ * each cpu the driver is assigned to with the cpumask.
+ *
+ * @drv: a pointer to a struct cpuidle_driver
+ *
+ * Returns 0 on success, < 0 otherwise
+ */
+static inline int __cpuidle_set_driver(struct cpuidle_driver *drv)
{
- int i;
+ int cpu;
- drv->refcnt = 0;
+ for_each_cpu(cpu, drv->cpumask) {
- for (i = drv->state_count - 1; i >= 0 ; i--) {
+ if (__cpuidle_get_cpu_driver(cpu))
+ return -EBUSY;
- if (!(drv->states[i].flags & CPUIDLE_FLAG_TIMER_STOP))
- continue;
-
- drv->bctimer = 1;
- on_each_cpu_mask(get_cpu_mask(cpu), cpuidle_setup_broadcast_timer,
- (void *)CLOCK_EVT_NOTIFY_BROADCAST_ON, 1);
- break;
+ per_cpu(cpuidle_drivers, cpu) = drv;
}
+
+ return 0;
}
-static int __cpuidle_register_driver(struct cpuidle_driver *drv, int cpu)
+/**
+ * __cpuidle_unset_driver: for each cpu the driver is handling, set the per cpu
+ * variable driver to NULL.
+ *
+ * @drv: a pointer to a struct cpuidle_driver
+ */
+static inline void __cpuidle_unset_driver(struct cpuidle_driver *drv)
{
- if (!drv || !drv->state_count)
- return -EINVAL;
-
- if (cpuidle_disabled())
- return -ENODEV;
-
- if (__cpuidle_get_cpu_driver(cpu))
- return -EBUSY;
+ int cpu;
- __cpuidle_driver_init(drv, cpu);
+ for_each_cpu(cpu, drv->cpumask) {
- __cpuidle_set_cpu_driver(drv, cpu);
+ if (drv != __cpuidle_get_cpu_driver(cpu))
+ continue;
- return 0;
+ per_cpu(cpuidle_drivers, cpu) = NULL;
+ }
}
-static void __cpuidle_unregister_driver(struct cpuidle_driver *drv, int cpu)
-{
- if (drv != __cpuidle_get_cpu_driver(cpu))
- return;
+#else
- if (!WARN_ON(drv->refcnt > 0))
- __cpuidle_set_cpu_driver(NULL, cpu);
+static struct cpuidle_driver *cpuidle_curr_driver;
- if (drv->bctimer) {
- drv->bctimer = 0;
- on_each_cpu_mask(get_cpu_mask(cpu), cpuidle_setup_broadcast_timer,
- (void *)CLOCK_EVT_NOTIFY_BROADCAST_OFF, 1);
- }
+/**
+ * __cpuidle_get_cpu_driver: returns the global cpuidle driver pointer.
+ *
+ * @cpu: an integer specifying the cpu number, this parameter is ignored
+ *
+ * Returns a pointer to a struct cpuidle_driver, NULL if no driver was
+ * previously registered
+ */
+static inline struct cpuidle_driver *__cpuidle_get_cpu_driver(int cpu)
+{
+ return cpuidle_curr_driver;
}
-#ifdef CONFIG_CPU_IDLE_MULTIPLE_DRIVERS
+/**
+ * __cpuidle_set_driver: assign the cpuidle driver pointer to the global cpuidle
+ * driver variable.
+ *
+ * @drv: a pointer to a struct cpuidle_driver
+ *
+ * Returns 0 on success, < 0 otherwise
+ */
+static inline int __cpuidle_set_driver(struct cpuidle_driver *drv)
+{
+ if (cpuidle_curr_driver)
+ return -EBUSY;
-static DEFINE_PER_CPU(struct cpuidle_driver *, cpuidle_drivers);
+ cpuidle_curr_driver = drv;
-static void __cpuidle_set_cpu_driver(struct cpuidle_driver *drv, int cpu)
-{
- per_cpu(cpuidle_drivers, cpu) = drv;
+ return 0;
}
-static struct cpuidle_driver *__cpuidle_get_cpu_driver(int cpu)
+/**
+ * __cpuidle_unset_driver: reset the global cpuidle driver variable if the
+ * cpuidle driver pointer match it.
+ *
+ * @drv: a pointer to a struct cpuidle_driver
+ */
+static inline void __cpuidle_unset_driver(struct cpuidle_driver *drv)
{
- return per_cpu(cpuidle_drivers, cpu);
+ if (drv == cpuidle_curr_driver)
+ cpuidle_curr_driver = NULL;
}
-static void __cpuidle_unregister_all_cpu_driver(struct cpuidle_driver *drv)
+#endif
+
+/**
+ * cpuidle_setup_broadcast_timer: set the broadcast timer notification for the
+ * current cpu. This function is called per cpu context invoked by a smp cross
+ * call. It is not supposed to be called directly.
+ *
+ * @arg: a void pointer, actually used to match the smp cross call api but used
+ * as a long with two values:
+ * - CLOCK_EVT_NOTIFY_BROADCAST_ON
+ * - CLOCK_EVT_NOTIFY_BROADCAST_OFF
+ */
+static void cpuidle_setup_broadcast_timer(void *arg)
{
- int cpu;
- for_each_present_cpu(cpu)
- __cpuidle_unregister_driver(drv, cpu);
+ int cpu = smp_processor_id();
+ clockevents_notify((long)(arg), &cpu);
}
-static int __cpuidle_register_all_cpu_driver(struct cpuidle_driver *drv)
+/**
+ * __cpuidle_driver_init: initialize the driver internal data.
+ *
+ * @drv: a valid pointer to a struct cpuidle_driver
+ *
+ * Returns 0 on success, < 0 otherwise
+ */
+static int __cpuidle_driver_init(struct cpuidle_driver *drv)
{
- int ret = 0;
- int i, cpu;
+ int i;
- for_each_present_cpu(cpu) {
- ret = __cpuidle_register_driver(drv, cpu);
- if (ret)
- break;
- }
+ drv->refcnt = 0;
- if (ret)
- for_each_present_cpu(i) {
- if (i == cpu)
- break;
- __cpuidle_unregister_driver(drv, i);
- }
+ /*
+ * we default here to all cpu possible because if the kernel
+ * boots with some cpus offline and then we online one of them
+ * the cpu notifier won't know which driver to assign
+ */
+ if (!drv->cpumask)
+ drv->cpumask = (struct cpumask *)cpu_possible_mask;
+
+ /*
+ * we look for the timer stop flag in the different states,
+ * so know we have to setup the broadcast timer. The loop is
+ * in reverse order, because usually the deeper state has this
+ * flag set
+ */
+ for (i = drv->state_count - 1; i >= 0 ; i--) {
+ if (!(drv->states[i].flags & CPUIDLE_FLAG_TIMER_STOP))
+ continue;
- return ret;
+ drv->bctimer = 1;
+ break;
+ }
+
+ return 0;
}
-int cpuidle_register_cpu_driver(struct cpuidle_driver *drv, int cpu)
+/**
+ * __cpuidle_register_driver: do some sanity checks, initializes the driver,
+ * assign the driver to the global cpuidle driver variable(s) and setup the
+ * broadcast timer if the cpuidle driver has some states which shutdown the
+ * local timer.
+ *
+ * @drv: a valid pointer to a struct cpuidle_driver
+ *
+ * Returns 0 on success, < 0 otherwise
+ */
+static int __cpuidle_register_driver(struct cpuidle_driver *drv)
{
int ret;
- spin_lock(&cpuidle_driver_lock);
- ret = __cpuidle_register_driver(drv, cpu);
- spin_unlock(&cpuidle_driver_lock);
+ if (!drv || !drv->state_count)
+ return -EINVAL;
- return ret;
-}
+ if (cpuidle_disabled())
+ return -ENODEV;
-void cpuidle_unregister_cpu_driver(struct cpuidle_driver *drv, int cpu)
-{
- spin_lock(&cpuidle_driver_lock);
- __cpuidle_unregister_driver(drv, cpu);
- spin_unlock(&cpuidle_driver_lock);
-}
+ ret = __cpuidle_driver_init(drv);
+ if (ret)
+ return ret;
-/**
- * cpuidle_register_driver - registers a driver
- * @drv: the driver
- */
-int cpuidle_register_driver(struct cpuidle_driver *drv)
-{
- int ret;
+ ret = __cpuidle_set_driver(drv);
+ if (ret)
+ return ret;
- spin_lock(&cpuidle_driver_lock);
- ret = __cpuidle_register_all_cpu_driver(drv);
- spin_unlock(&cpuidle_driver_lock);
+ if (drv->bctimer)
+ on_each_cpu_mask(drv->cpumask, cpuidle_setup_broadcast_timer,
+ (void *)CLOCK_EVT_NOTIFY_BROADCAST_ON, 1);
- return ret;
+ return 0;
}
-EXPORT_SYMBOL_GPL(cpuidle_register_driver);
/**
- * cpuidle_unregister_driver - unregisters a driver
- * @drv: the driver
+ * __cpuidle_unregister_driver: checks the driver is no longer in use, reset the
+ * global cpuidle driver variable(s) and disable the timer broadcast
+ * notification mechanism if it was in use.
+ *
+ * @drv: a valid pointer to a struct cpuidle_driver
+ *
+ * Returns 0 on success, < 0 otherwise
*/
-void cpuidle_unregister_driver(struct cpuidle_driver *drv)
+static void __cpuidle_unregister_driver(struct cpuidle_driver *drv)
{
- spin_lock(&cpuidle_driver_lock);
- __cpuidle_unregister_all_cpu_driver(drv);
- spin_unlock(&cpuidle_driver_lock);
-}
-EXPORT_SYMBOL_GPL(cpuidle_unregister_driver);
-
-#else
-
-static struct cpuidle_driver *cpuidle_curr_driver;
+ if (!WARN_ON(drv->refcnt > 0))
+ return;
-static inline void __cpuidle_set_cpu_driver(struct cpuidle_driver *drv, int cpu)
-{
- cpuidle_curr_driver = drv;
-}
+ __cpuidle_unset_driver(drv);
-static inline struct cpuidle_driver *__cpuidle_get_cpu_driver(int cpu)
-{
- return cpuidle_curr_driver;
+ if (drv->bctimer) {
+ drv->bctimer = 0;
+ on_each_cpu_mask(drv->cpumask, cpuidle_setup_broadcast_timer,
+ (void *)CLOCK_EVT_NOTIFY_BROADCAST_OFF, 1);
+ }
}
/**
- * cpuidle_register_driver - registers a driver
- * @drv: the driver
+ * cpuidle_register_driver: registers a driver by taking a lock to prevent
+ * multiple callers to [un]register a driver at the same time.
+ *
+ * @drv: a pointer to a valid struct cpuidle_driver
+ *
+ * Returns 0 on success, < 0 otherwise
*/
int cpuidle_register_driver(struct cpuidle_driver *drv)
{
- int ret, cpu;
+ int ret;
- cpu = get_cpu();
spin_lock(&cpuidle_driver_lock);
- ret = __cpuidle_register_driver(drv, cpu);
+ ret = __cpuidle_register_driver(drv);
spin_unlock(&cpuidle_driver_lock);
- put_cpu();
return ret;
}
EXPORT_SYMBOL_GPL(cpuidle_register_driver);
/**
- * cpuidle_unregister_driver - unregisters a driver
- * @drv: the driver
+ * cpuidle_unregister_driver: unregisters a driver by taking a lock to prevent
+ * multiple callers to [un]register a driver at the same time. The specified
+ * driver must match the driver currently registered.
+ *
+ * @drv: a pointer to a valid struct cpuidle_driver
*/
void cpuidle_unregister_driver(struct cpuidle_driver *drv)
{
- int cpu;
-
- cpu = get_cpu();
spin_lock(&cpuidle_driver_lock);
- __cpuidle_unregister_driver(drv, cpu);
+ __cpuidle_unregister_driver(drv);
spin_unlock(&cpuidle_driver_lock);
- put_cpu();
}
EXPORT_SYMBOL_GPL(cpuidle_unregister_driver);
-#endif
/**
- * cpuidle_get_driver - return the current driver
+ * cpuidle_get_driver: returns the driver tied with the current cpu.
+ *
+ * Returns a struct cpuidle_driver pointer, or NULL if no driver is registered
*/
struct cpuidle_driver *cpuidle_get_driver(void)
{
@@ -233,7 +294,12 @@ struct cpuidle_driver *cpuidle_get_driver(void)
EXPORT_SYMBOL_GPL(cpuidle_get_driver);
/**
- * cpuidle_get_cpu_driver - return the driver tied with a cpu
+ * cpuidle_get_cpu_driver: returns the driver registered with a cpu.
+ *
+ * @dev: a valid pointer to a struct cpuidle_device
+ *
+ * Returns a struct cpuidle_driver pointer, or NULL if no driver is registered
+ * for the specified cpu
*/
struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev)
{
@@ -244,6 +310,13 @@ struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev)
}
EXPORT_SYMBOL_GPL(cpuidle_get_cpu_driver);
+/**
+ * cpuidle_driver_ref: gets a refcount for the driver. Note this function takes
+ * a refcount for the driver assigned to the current cpu.
+ *
+ * Returns a struct cpuidle_driver pointer, or NULL if no driver is registered
+ * for the current cpu
+ */
struct cpuidle_driver *cpuidle_driver_ref(void)
{
struct cpuidle_driver *drv;
@@ -257,6 +330,10 @@ struct cpuidle_driver *cpuidle_driver_ref(void)
return drv;
}
+/**
+ * cpuidle_driver_unref: puts down the refcount for the driver. Note this
+ * function decrement the refcount for the driver assigned to the current cpu.
+ */
void cpuidle_driver_unref(void)
{
struct cpuidle_driver *drv = cpuidle_get_driver();
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index 8f04062..63d78b1 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -101,16 +101,20 @@ static inline int cpuidle_get_last_residency(struct cpuidle_device *dev)
****************************/
struct cpuidle_driver {
- const char *name;
- struct module *owner;
- int refcnt;
+ const char *name;
+ struct module *owner;
+ int refcnt;
/* used by the cpuidle framework to setup the broadcast timer */
- unsigned int bctimer:1;
+ unsigned int bctimer:1;
+
/* states array must be ordered in decreasing power consumption */
- struct cpuidle_state states[CPUIDLE_STATE_MAX];
- int state_count;
- int safe_state_index;
+ struct cpuidle_state states[CPUIDLE_STATE_MAX];
+ int state_count;
+ int safe_state_index;
+
+ /* the driver handles the cpus in cpumask */
+ struct cpumask *cpumask;
};
#ifdef CONFIG_CPU_IDLE
@@ -135,9 +139,6 @@ extern void cpuidle_disable_device(struct cpuidle_device *dev);
extern int cpuidle_play_dead(void);
extern struct cpuidle_driver *cpuidle_get_cpu_driver(struct cpuidle_device *dev);
-extern int cpuidle_register_cpu_driver(struct cpuidle_driver *drv, int cpu);
-extern void cpuidle_unregister_cpu_driver(struct cpuidle_driver *drv, int cpu);
-
#else
static inline void disable_cpuidle(void) { }
static inline int cpuidle_idle_call(void) { return -ENODEV; }
--
1.7.9.5
Hi Rafael,
Here are few more fixes for 3.10-rc2.
Viresh Kumar (3):
cpufreq: Add EXPORT_SYMBOL_GPL for have_governor_per_policy
cpufreq: governors: Move get_governor_parent_kobj() to cpufreq.c
cpufreq: Drop rwsem lock around CPUFREQ_GOV_POLICY_EXIT
drivers/cpufreq/cpufreq.c | 19 +++++++++++++++++--
drivers/cpufreq/cpufreq_governor.c | 8 --------
include/linux/cpufreq.h | 1 +
3 files changed, 18 insertions(+), 10 deletions(-)
--
1.7.12.rc2.18.g61b472e
=== Highlights ===
* Lots of plumbers android mini-summit planning and discussions
* Todd Poynor from Google implemented timerfd support for alarmtimers
and asked me to review the changes for AOSP. The feature has been a todo
of mine for awhile, so its very cool to see it implemented. Since they
will be using this for Android, so I queued it for upstream as well. The
hope is this would provide a proper upstream replacement for the android
alarmdev.
* Reviewed a number of community patches and queued a few of them for 3.11
* Worked with Minchan on a new iteration of the volatile range patchset.
There's a bit of contention about approaches around the interface (he
doesn't see some of the lsf-mm objections as an issue), so we're trying
to sort that out.
* Talked w/ tglx about getting DanielL to act as submaintainer for
clockevent drivers.
* Reviewed blueprints and did weekly email status
* Submitted expense report for Dublin flight
* Zoran found a timekeeping suspend bug, so worked with him to review
his patch, get it to lkml, and queued for upstream.
=== Plans ===
* Answer some community questions on volatile ranges and Android's usage
of ashmem
* Try to address kdb-fiq concerns.
* ION research/discussion
=== Issues ===
* NA
The new context tracking subsystem unconditionally includes kvm_host.h
headers for the guest enter/exit macros. This causes a compile
failure when KVM is not enabled.
Fix by adding an IS_ENABLED(CONFIG_KVM) check to kvm_host so it can
be included/compiled even when KVM is not enabled.
Cc: Frederic Weisbecker <fweisbec(a)gmail.com>
Signed-off-by: Kevin Hilman <khilman(a)linaro.org>
---
Applies on v3.9-rc2
include/linux/kvm_host.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h
index cad77fe..a942863 100644
--- a/include/linux/kvm_host.h
+++ b/include/linux/kvm_host.h
@@ -1,6 +1,8 @@
#ifndef __KVM_HOST_H
#define __KVM_HOST_H
+#if IS_ENABLED(CONFIG_KVM)
+
/*
* This work is licensed under the terms of the GNU GPL, version 2. See
* the COPYING file in the top-level directory.
@@ -1055,5 +1057,8 @@ static inline bool kvm_vcpu_eligible_for_directed_yield(struct kvm_vcpu *vcpu)
}
#endif /* CONFIG_HAVE_KVM_CPU_RELAX_INTERCEPT */
+#else
+static inline void __guest_enter(void) { return; }
+static inline void __guest_exit(void) { return; }
+#endif /* IS_ENABLED(CONFIG_KVM) */
#endif
-
--
1.8.1.2
== Linus Walleij linusw ==
=== Highlights ===
* Torvalds did pull the GPIO changes from Grant in the
end. I have been spending some time on QA stuff like
discussing with Fengguang @Intel on getting automated
0day builds of my kernel.org trees back on line and that
is running smoothly now. Also figured out how to run
Arnds buildall.mak script.
* Collected a set of ux500 fixes post-v3.10-rc1 and sent
a pull request to the ARM SoC maintainers.
* Continued to apply DMA40 patches from Lee on a
specific DMA40 branch targeted for ARM SoC. Got some
ACKs and awaiting some more ACKs. A first branch
will be prepared for pull request to ARM SoC soon-ish.
* Discussed future ux500 work with Lee.
* Reviewed lots of pinctrl code but have a hard time to keep
up. I have collected a set of fixes to send to Torvalds.
This is growing wildly...
* Updated my profile @HR Connection as requested.
* Reviewed TI-Nspire timer driver.
=== Plans ===
* Help Grant with stacking up some GPIO fixes.
* Finalize U300 DT+multiplatform patch set. Maybe send
a partial pull request with the stuff I have.
* Integrate Integrator PCI patch set, then start to delete
board files and convert to multiplatform.
* Convert Nomadik pinctrl driver to register GPIO ranges
from the gpiochip side.
* Test the PL08x patches on the Ericsson Research
PB11MPCore and submit platform data for using
pl08x DMA on that platform.
* Get hands dirty with regmap.
=== Issues ===
* Need a PCI branch at ARM SoC to request Integrator PCI
DT patches to be pulled into.
* Some impediments from internal turmoil @ST-Ericsson.
Thanks,
Linus Walleij
Tuesday, May 14, 2013 11:17 PM, Vikas Sajjan wrote:
>
> Hi Vikas,
>
> On Tuesday 14 of May 2013 18:25:51 Vikas Sajjan wrote:
> > Adds GPIO parsing functionality for "LCD backlight" and "LCD enable"
> > GPIO pins of exynos dp controller.
> >
> > Signed-off-by: Vikas Sajjan <vikas.sajjan(a)linaro.org>
> > ---
> > drivers/video/exynos/exynos_dp_core.c | 45
> > +++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+)
> >
>
> I don't think that Exynos DP driver is right place for such code. Backlight
> and LCD drivers are responsible for backlight and LCD power control using
> backlight and LCD subsystems.
>
> IMHO the correct solution would be to either extend existing backlight/lcd
> drivers found in drivers/video/backlight to support direct GPIO control and
> parse GPIO pins from device tree or create new gpio_bl and gpio_lcd drivers.
Hi Vikas Sajian,
I agree with Tomasz Figa's opinion.
Backlight/LCD framework should be used.
eDP panel backlight on SMDK5210 board can be controlled by PWM;
thus, pwm-backlight driver should be used.
Also, eDP panel reset pin should be controlled by using
platform-lcd driver.
>
> CCing Richard, Florian and linux-fbdev.
Also, I have been doing backlight reviews instead of Richard,
please do CC'ing me.
Best regards,
Jingoo Han
>
> Best regards,
> Tomasz
Ping.
On 17 April 2013 21:16, Linus Walleij <linus.walleij(a)linaro.org> wrote:
> On Tue, Apr 16, 2013 at 3:48 PM, Naresh Kamboju
> <naresh.kamboju(a)linaro.org> wrote:
>> On 12 April 2013 04:07, Linus Walleij <linus.walleij(a)linaro.org> wrote:
>>> Hey it works. Didn't see this before I fixed it tho :-)
>>> http://marc.info/?l=linux-kernel&m=136567139910888&w=2
>>
>> This commit not yet been merged in to linux-next "next-20130416".
>> Due to this reason still snowball build fails at above error.
>
> That is outside of my jurisdiction, only the MFD maintainer Samuel
> Ortiz can merge this patch.
>
> Yours,
> Linus Walleij
This patch-set implements early printk support for virtio console
devices by adding and using emergency write register to virtio console's
config space.
The current virtio early printk code in kernel expects that hypervisor
will provide some mechanism generally a hypercall to support early printk.
This patch-set does not break existing hypercall based early print support.
This implementation adds:
1. Emergency writeonly register named emerg_wr in
virtio console's config space.
2. Host feature flags namely VIRTIO_CONSOLE_F_EMERG_WRITE
for telling guest about early-write capability in console device.
Emergency write mechanism:
1. When a guest wants to out some character, it has to simply write
the character to emerg_wr register in config space of
virtio console device.
Pranavkumar Sawargaonkar (3):
virtio: console: Add emergency writeonly register to config space
Documentation: virtio: Add emergency write (emerg_wr) config register
in virtio console.
arm64: earlyprintk support for virtio-mmio console.
Documentation/virtual/virtio-spec.txt | 8 +++++++-
arch/arm64/kernel/early_printk.c | 35 +++++++++++++++++++++++++++++++++
include/uapi/linux/virtio_console.h | 3 +++
3 files changed, 45 insertions(+), 1 deletion(-)
--
1.7.9.5
In order to safely support the use of NEON or VFP instructions in
kernel mode, some precautions need to be taken:
- the userland context that may be present in the registers (even
if the NEON/VFP is currently disabled) must be stored under the
correct task (which may not be 'current' in the UP case),
- to avoid having to keep track of additional vfpstates for the
kernel side, disallow the use of NEON/VFP in interrupt context
and run with preemption disabled,
- after use, re-enable preemption and re-enable the lazy restore
machinery by disabling the NEON/VFP unit.
This patch adds the functions kernel_vfp_begin() and kernel_vfp_end()
which take care of the above.
Signed-off-by: Ard Biesheuvel <ard.biesheuvel(a)linaro.org>
---
arch/arm/include/asm/vfp.h | 5 +++++
arch/arm/vfp/vfpmodule.c | 40 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+)
diff --git a/arch/arm/include/asm/vfp.h b/arch/arm/include/asm/vfp.h
index f4ab34f..421506b 100644
--- a/arch/arm/include/asm/vfp.h
+++ b/arch/arm/include/asm/vfp.h
@@ -5,6 +5,11 @@
* First, the standard VFP set.
*/
+#ifndef __ASSEMBLY__
+void kernel_vfp_begin(void);
+void kernel_vfp_end(void);
+#endif
+
#define FPSID cr0
#define FPSCR cr1
#define MVFR1 cr6
diff --git a/arch/arm/vfp/vfpmodule.c b/arch/arm/vfp/vfpmodule.c
index 5dfbb0b..e30a6335 100644
--- a/arch/arm/vfp/vfpmodule.c
+++ b/arch/arm/vfp/vfpmodule.c
@@ -20,6 +20,7 @@
#include <linux/init.h>
#include <linux/uaccess.h>
#include <linux/user.h>
+#include <linux/export.h>
#include <asm/cp15.h>
#include <asm/cputype.h>
@@ -649,6 +650,45 @@ static int vfp_hotplug(struct notifier_block *b, unsigned long action,
}
/*
+ * Kernel-side NEON/VFP support functions
+ */
+void kernel_vfp_begin(void)
+{
+ struct thread_info *thread = current_thread_info();
+ unsigned int cpu = get_cpu();
+ u32 fpexc;
+
+ /* Avoid using the NEON/VFP in interrupt context */
+ might_sleep();
+ preempt_disable();
+
+ fpexc = fmrx(FPEXC) | FPEXC_EN;
+ fmxr(FPEXC, fpexc);
+
+ /*
+ * Save the userland NEON/VFP state. Under UP, the owner could be a task
+ * other than 'current'
+ */
+ if (vfp_state_in_hw(cpu, thread))
+ vfp_save_state(&thread->vfpstate, fpexc);
+#ifndef CONFIG_SMP
+ else if (vfp_current_hw_state[cpu] != NULL)
+ vfp_save_state(vfp_current_hw_state[cpu], fpexc);
+#endif
+ vfp_current_hw_state[cpu] = NULL;
+ put_cpu();
+}
+EXPORT_SYMBOL(kernel_vfp_begin);
+
+void kernel_vfp_end(void)
+{
+ /* Disable the NEON/VFP unit. */
+ fmxr(FPEXC, fmrx(FPEXC) & ~FPEXC_EN);
+ preempt_enable();
+}
+EXPORT_SYMBOL(kernel_vfp_end);
+
+/*
* VFP support code initialisation.
*/
static int __init vfp_init(void)
--
1.8.1.2
Hi,
I am working on kexec for ARM(armv7 architecture ) on Linux-2.6.32.59.
I am unable to boot secondary kernel zImage using kexec.
It got hanged after "Uncompressing Linux.....done, b
ooting the kernel."
I debugged through hardware debugger and found issue in
"arch/arm/kernel/head.S" at __turn_mmu_on
which is failing to initialized the mmu.
I will highly appreciate if you can suggest some pointers
to debug this issue.
kexec command use:
kexec -l /home/zImage --command-line=`cat /proc/cmdline`
kexec -e
Thanks and Regards,
Pankaj Pandey
This patchset was called: "Create sched_select_cpu() and use it for workqueues"
for the first three versions.
Earlier discussions over v3, v2 and v1 can be found here:
https://lkml.org/lkml/2013/3/18/364http://lists.linaro.org/pipermail/linaro-dev/2012-November/014344.htmlhttp://www.mail-archive.com/linaro-dev@lists.linaro.org/msg13342.html
V4 is here:
https://lkml.org/lkml/2013/3/31/55
Workqueues can be performance or power oriented. For performance we may want to
keep them running on a single cpu, so that it remains cache hot. For power we
can give scheduler the liberty to choose target cpu for running work handler.
Later one (Power oriented WQ) can be achieved if the workqueue is allocated with
WQ_UNBOUND flag. Enabling CONFIG_WQ_POWER_EFFICIENT will set
'wq_power_efficient' to 'true'. Setting 'power_efficient' boot param will
override value of 'wq_power_efficient' variable. When 'wq_power_efficient' is
set to 'true', we will convert WQ_POWER_EFFICIENT flag to WQ_UNBOUND on wq
allocation. And so scheduler will have the liberty to choose where to run this
work.
Here we are migrating few users of workqueues to WQ_POWER_EFFICIENT. These
drivers are found to be very much active on idle or lightly busy system and
using WQ_POWER_EFFICIENT for these gave impressive results.
These would be used in power saving mode only if relevant configs are enabled
at compile time or in bootargs. Otherwise behavior is unchanged.
Setup:
-----
- ARM Vexpress TC2 - big.LITTLE CPU
- Core 0-1: A15, 2-4: A7
- rootfs: linaro-ubuntu-devel
This patchset has been tested on a big LITTLE system (heterogeneous) but is
useful for all other homogeneous systems as well. During these tests audio was
played in background using aplay.
Results:
-------
Cluster A15 Energy Cluster A7 Energy Total
------------------------- ----------------------- ------
Without this patchset (Energy in Joules):
---------------------------------------------------
0.151162 2.183545 2.334707
0.223730 2.687067 2.910797
0.289687 2.732702 3.022389
0.454198 2.745908 3.200106
0.495552 2.746465 3.242017
Average:
0.322866 2.619137 2.942003
With this patchset (Energy in Joules):
-----------------------------------------------
0.226421 2.283658 2.510079
0.151361 2.236656 2.388017
0.197726 2.249849 2.447575
0.221915 2.229446 2.451361
0.347098 2.257707 2.604805
Average:
0.2289042 2.2514632 2.4803674
Above tests are repeated multiple times and events are tracked using trace-cmd
and analysed using kernelshark. And it was easily noticeable that idle time for
many cpus has increased considerably, which eventually saved some power.
V4->V5:
-------
- Created new wq flag: WQ_POWER_EFFICIENT, config option:
CONFIG_WQ_POWER_EFFICIENT and kernel param workqueue.power_efficient.
- Created few system wide workqueues aligned towards power saving.
V3->V4:
-------
- Dropped changes to kernel/sched directory and hence
sched_select_non_idle_cpu().
- Dropped queue_work_on_any_cpu()
- Created system_freezable_unbound_wq
- Changed all patches accordingly.
V2->V3:
-------
- Dropped changes into core queue_work() API, rather create *_on_any_cpu()
APIs
- Dropped running timers migration patch as that was broken
- Migrated few users of workqueues to use *_on_any_cpu() APIs.
Viresh Kumar (5):
workqueues: Introduce new flag WQ_POWER_EFFICIENT for power oriented
workqueues
workqueue: Add system wide power_efficient workqueues
PHYLIB: queue work on system_power_efficient_wq
block: queue work on power efficient wq
fbcon: queue work on power efficient wq
Documentation/kernel-parameters.txt | 17 +++++++++++++++++
block/blk-core.c | 3 ++-
block/blk-ioc.c | 3 ++-
block/genhd.c | 12 ++++++++----
drivers/net/phy/phy.c | 9 +++++----
drivers/video/console/fbcon.c | 2 +-
include/linux/workqueue.h | 10 ++++++++++
kernel/power/Kconfig | 19 +++++++++++++++++++
kernel/workqueue.c | 24 +++++++++++++++++++++++-
9 files changed, 87 insertions(+), 12 deletions(-)
--
1.7.12.rc2.18.g61b472e
This patch series adds LCD backlight and LCD enable gpios pins to dp-controller
DT node of exynos5250-smdk5250 and parsing of these gpio pins in exynos-dp driver
tested on exynos5250-smdk5250 Board.
rebased on kgene-next branch of
https://git.kernel.org/cgit/linux/kernel/git/kgene/linux-samsung.git/
Vikas Sajjan (2):
video: exynos_dp: Add parsing of gpios pins to exynos-dp driver
ARM: dts: Add LCD backlight and LCD enable gpios pins to
dp-controller DT node
arch/arm/boot/dts/exynos5250-smdk5250.dts | 3 ++
drivers/video/exynos/exynos_dp_core.c | 45 +++++++++++++++++++++++++++++
2 files changed, 48 insertions(+)
--
1.7.9.5
From: Sukanto Ghosh <sghosh(a)apm.com>
The format of the lower 32-bits of the 64-bit operand to 'dc cisw' is
unchanged from ARMv7 architecture and the upper bits are RES0. This
implies that the 'way' field of the operand of 'dc cisw' occupies the
bit-positions [31 .. (32-A)]. Due to the use of 64-bit extended operands
to 'clz', the existing implementation of __flush_dcache_all is incorrectly
placing the 'way' field in the bit-positions [63 .. (64-A)].
Signed-off-by: Sukanto Ghosh <sghosh(a)apm.com>
Tested-by: Anup Patel <anup.patel(a)linaro.org>
---
arch/arm64/mm/cache.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/mm/cache.S b/arch/arm64/mm/cache.S
index abe69b8..48a3860 100644
--- a/arch/arm64/mm/cache.S
+++ b/arch/arm64/mm/cache.S
@@ -52,7 +52,7 @@ loop1:
add x2, x2, #4 // add 4 (line length offset)
mov x4, #0x3ff
and x4, x4, x1, lsr #3 // find maximum number on the way size
- clz x5, x4 // find bit position of way size increment
+ clz w5, w4 // find bit position of way size increment
mov x7, #0x7fff
and x7, x7, x1, lsr #13 // extract max number of the index size
loop2:
--
1.7.9.5
=== David Long ===
=== Highlights ===
* Tixy voiced doubts about the approach I used for uprobes being
upstreamable due to some redundancy in the kprobe/uprobe code. We
talked about an alternative design which I now have partially implemented.
* Helped relocate the Nashua office to its new space.
=== Plans ===
* Continue with uprobe/kprobe
* Start building systemtap
=== Issues ===
* None
-dl
hi Nico & all,
After we studied the IKS code, we believe the code is general and
smoothly and can almost meet well for our own SoC's requirement; here
also have some questions want to confirm with you guys:
1. When outbound core wake up inbound core, the outbound core's thread
will sleep until the inbound core use MCPM’s early pork to send IPI;
a) Looks like this method somehow is due to TC2 board has long letancy
to power on/off cluster and core; right? How about to use polling
method? because on our own SoC, the wakenup interval will take _only_
about 10 ~ 20us;
b) The inbound core will send IPI to outbound core for the
synchronization, but at this point the inbound core's GIC's cpu
interface is disabled; so even the core's cpu interface is disabled, can
the core send SGI to other cores?
c) MCPM's patchset merged for mainline have no related function for
early pork, so later will early pork related functions be committed to
mainline?
2. Now the switching is an async operation, means after the function
bL_switch_request is return back, we cannot say switching has been
completed; so we have some concern for it.
For example, when switch from A15 core to A7 core, then maybe we want to
decrease the voltage so that can save power; if the switching is an
async operation, then it maybe introduce the issue is: after return back
from the function bL_switch_request, then s/w will decrease the voltage;
but at the meantime, the real switching is ongoing on another pair cores.
i browser the git log and get to know at the beginning the switching is
synced by using kernel's workqueue, later changed to use a dedicated
kernel thread with FIFO type; do u think it's better to go ahead to add
sync method for switching?
3. After enabled switcher, then it will disable hotplug.
Actually current code can support hotplug with IKS; because with IKS,
the logical core will map the according physical core id and GIC's
interface id, so that it can make sure if the system has hotplugged out
which physical core, later the kernel can hotplug in this physical core.
So could u give more hints why iks need disable hotplug?
--
Thx,
Leo Yan
=== Highlights ===
* Did a first pass at addressing remapping issue for volatile ranges
(still waiting on Minchan's feedback)
* Updated Anton's KDB/FIQ patch queues. Pinged Jason and sent the short
list out to lkml for feedback.
* Cherry-picked the ION code into a dev tree against 3.10 to learn more
about it in prep for future discussions.
* Reached out to Arnd on ION dma questions.
* Updated linaro.android tree to pre-3.10-rc1, ran into some trouble
testing since panda wasn't booting, but Tixy helped with testing and
Kevin followed up with a solution for panda.
* Sent out some requests-for-participation emails for Linux Plumbers
Android miniconf
* Talked w/ Deepak about drivers/clocksource issues and other planning
* Reviewed YongQins's get_user macro fix
* Reviewed blueprints and had bi-weekly hangout with android upstreaming
team
* Reviewed Dmitry's vfat ioctl patch
* Reviewed Zoran's suspend watchdog patchset & discussed plans for
suspend-time logging
=== Plans ===
* Get feedback from Minchan and send volatile ranges to lkml
* Probably More LPC minisummit planning
* Hopefully more ION research/discussion
=== Issues ===
* NA
Hey Kevin,
Sorry to pester you, but you've always been helpful with these sort
of questions.
I'm trying to test a pre 3.10-rc1 kernel on panda, and its hanging after
"Starting kernel ..."
3.9 boots fine, and I was curious if you had any hints as to what new
config magic I need to get things going.
Attached are my good/bad configs.
thanks
-john
This patch-set implements early printk support for virtio console devices without using any hypercalls.
The current virtio early printk code in kernel expects that hypervisor will provide some mechanism generally a hypercall to support early printk. This patch-set does not break existing hypercall based early print support.
This implementation adds:
1. Early writeonly register named early_wr in virtio console's config space.
2. Host feature flags namely VIRTIO_CONSOLE_F_EARLY_WRITE for telling guest about early-write capability in console device.
Early write mechanism:
1. When a guest wants to out some character, it has to simply write the character to early_wr register in config space of virtio console device.
Pranavkumar Sawargaonkar (2):
virtio: console: Add early writeonly register to config space
arm64: earlyprintk support for virtio-mmio console
Documentation/virtual/virtio-spec.txt | 13 ++++++++++--
arch/arm64/kernel/early_printk.c | 35 +++++++++++++++++++++++++++++++++
include/uapi/linux/virtio_console.h | 3 +++
3 files changed, 49 insertions(+), 2 deletions(-)
--
1.7.9.5
Hi,
I checked out 13.04 build and followed instructions from "Building from
suorce" tab.
https://releases.linaro.org/13.04/openembedded/aarch64/
I compiled using "bitbake linaro-image-sdk". I am getting following error.
Does anybody know what is the problem?
Thanks,
Aparna
getdents.h:60:16: note: each undeclared identifier is reported only once
for each function it appears in
| In file included from getdents01.c:57:0:
| getdents.h: In function 'getdents':
| getdents.h:60:16: error: 'SYS_getdents' undeclared (first use in this
function)
| getdents.h:60:16: note: each undeclared identifier is reported only once
for each function it appears in
| In file included from getdents03.c:56:0:
| getdents.h: In function 'getdents':
| getdents.h:60:16: error: 'SYS_getdents' undeclared (first use in this
function)
| getdents.h:60:16: note: each undeclared identifier is reported only once
for each function it appears in
| In file included from getdents02.c:53:0:
| getdents.h: In function 'getdents':In file included from
getdents04.c:56:0:
| getdents.h: In function 'getdents':
|
| getdents.h:60:16: error: 'SYS_getdents' undeclared (first use in this
function)getdents.h:60:16: error: 'SYS_getdents' undeclared (first use in
this function)
|
| getdents.h:60:16: note: each undeclared identifier is reported only once
for each function it appears in
| getdents.h:60:16: note: each undeclared identifier is reported only once
for each function it appears in
| In file included from getdents02.c:53:0:
| getdents.h: In function 'getdents':
| getdents.h:60:16: error: 'SYS_getdents' undeclared (first use in this
function)
| getdents.h:60:16: note: each undeclared identifier is reported only once
for each function it appears in
| In file included from getdents03.c:56:0:
| getdents.h: In function 'getdents':
| getdents.h:60:16: error: 'SYS_getdents' undeclared (first use in this
function)
| getdents.h:60:16: note: each undeclared identifier is reported only once
for each function it appears in
| make[4]: *** [getdents01] Error 1
| make[4]: *** Waiting for unfinished jobs....
| make[4]: *** [getdents01_64.o] Error 1
| make[4]: *** [getdents03] Error 1
| make[4]: *** [getdents02] Error 1
| make[4]: *** [getdents04] Error 1
| In file included from getdents04.c:56:0:
| getdents.h: In function 'getdents':
| getdents.h:60:16: error: 'SYS_getdents' undeclared (first use in this
function)
| getdents.h:60:16: note: each undeclared identifier is reported only once
for each function it appears in
| make[4]: *** [getdents03_64.o] Error 1
| make[4]: *** [getdents02_64.o] Error 1
| make[4]: *** [getdents04_64.o] Error 1
| make[4]: Leaving directory
`/home/kvs/aparna/openembedded/build/tmp-eglibc/work/aarch64-oe-linux/ltp/20120903-r2/ltp-20120903/testcases/kernel/syscalls/getdents'
| make[3]: *** [all] Error 2
| make[3]: Leaving directory
`/home/kvs/aparna/openembedded/build/tmp-eglibc/work/aarch64-oe-linux/ltp/20120903-r2/ltp-20120903/testcases/kernel/syscalls'
| make[2]: *** [all] Error 2
| make[2]: Leaving directory
`/home/kvs/aparna/openembedded/build/tmp-eglibc/work/aarch64-oe-linux/ltp/20120903-r2/ltp-20120903/testcases/kernel'
| make[1]: *** [all] Error 2
| make[1]: Leaving directory
`/home/kvs/aparna/openembedded/build/tmp-eglibc/work/aarch64-oe-linux/ltp/20120903-r2/ltp-20120903/testcases'
| make: *** [testcases-all] Error 2
| ERROR: oe_runmake failed
I'm delighted to announce that the Linaro Technical Steering Committee
has approved the release of the big.LITTLE in-kernel switcher (IKS) code
to the public.
So here it is:
Branch big.LITTLE-IKS-snapshot of
git://git.linaro.org/landing-teams/working/arm/kernel.git
Although this is a snapshot of our latest IKS code, it still needs some
minor tidying before it is submitted upstream. So please consider the
above as a temporary branch for people to look and play with, and not a
branch that we'll keep stable and maintain.
This code was also developed for and tested on the VExpress TC2
development platform. An MCPM backend and possibly a special cpufreq
clock driver are required for this code to be usable on other platforms.
The switcher concept is discussed here:
http://lwn.net/Articles/481055/
Porting documentation is available here:
https://wiki.linaro.org/projects/big.LITTLE.MP/Big.Little.Switcher/Docs/por…
The switcher code description is available here (slightly out of date):
https://wiki.linaro.org/projects/big.LITTLE.MP/Big.Little.Switcher/Docs/in-…
And a review of the MCPM layer upon which IKS and HMP rely:
http://lwn.net/Articles/539082/
The core MCPM patches are queued for inclusion into the v3.10 mainline
kernel. The MCPM backend for TC2 and the IKS patches will tentatively
be submitted for v3.11.
Nicolas
== Linus Walleij linusw ==
=== Highlights ===
* Sent a pull request to Torvalds for the v3.10 pinctrl
bundle. Sent another request for two fixes on top of it.
All pulled into mainline.
* The GPIO tree exploded and will be held back for this
merge window. Root-causing with Grant so as to make
sure it won't happen again. (Cross-tree dependencies
caused this. Partly my fault.)
* Started to apply DMA40 patches from Lee on a specific
DMA40 branch targeted for ARM SoC. Awaiting some
ACKs and complaining as I go along.
* Started to queue Ux500 device tree patches on another
branch.
* Iterated U300 DT patches and sent a multiplatform series
on top of it. Will round it off with a series moving the clocks
to the DT as a final step.
=== Plans ===
* On vacation until 9/5 i.e. I'm off this coming week.
(Will be watching the merge window for any major disasters.)
* Stack fixes for the -rc series.
* Finalize U300 patch set.
* Finalize Integrator PCI patch set, then start to delete
board files and convert to multiplatform.
* Convert Nomadik pinctrl driver to register GPIO ranges
from the gpiochip side.
* Test the PL08x patches on the Ericsson Research
PB11MPCore and submit platform data for using
pl08x DMA on that platform.
* Get hands dirty with regmap.
=== Issues ===
* N/A
Thanks,
Linus Walleij
=== Highlights ===
* Reworked a good chunk of the volatile range patch set, addressing
issues from lsf-mm, and making required interface changes. Sent patches
to Minchan for review.
* Reviewed tglx's clocksource unregister patches
* Pinged Keith Packard on his blog post related to userland sync w/ X to
see if there was much overlap with Android sync.
* Discussed Android/entropy security issue w/ Ted Tso
* Reviewed Zoran's patchset prior to it going to lkml
* Reviewed blueprints and sent out weekly mail summary
* Helped with 13.05 Engineering Update
* Worked on LPC Android minisummit planning
* Synced with Mathieu on keyreset planning
=== Plans ===
* Address remapping issue in volatile ranges patchset
* Unify volatile range purging logic in volatile ranges patchset
* Send volatile ranges to lkml
* More LPC minisummit planning
* Hopefully a chance for ION research
=== Issues ===
* NA
Hi Rafael,
I know I am late for this merge window and you have already closed the gates :)
If you can still take them, its good, otherwise we will push this for v3.10-rc2.
These are minor fixes for ARM big LITTLE cpufreq driver. It doesn't impact any
other driver or cpufreq core and are fairly independent.
Viresh Kumar (5):
cpufreq: ARM big LITTLE: Select PM_OPP
cpufreq: ARM big LITTLE DT: Return correct transition latency
cpufreq: ARM big LITTLE DT: Return CPUFREQ_ETERNAL if clock-latency
isn't found
cpufreq: ARM big LITTLE: Move cpu_to_cluster() to arm_big_little.h
cpufreq: ARM big LITTLE: Improve print message
drivers/cpufreq/Kconfig.arm | 1 +
drivers/cpufreq/arm_big_little.c | 7 +------
drivers/cpufreq/arm_big_little.h | 5 +++++
drivers/cpufreq/arm_big_little_dt.c | 9 +++++----
4 files changed, 12 insertions(+), 10 deletions(-)
--
1.7.12.rc2.18.g61b472e
I just saw your pull request and so these should go in rc2 now.
These are fixes for cpufreq core and common governor part. They mostly impact
systems which have set have_governor_per_policy to true. i.e. big LITTLE cpufreq
driver.
Viresh Kumar (2):
cpufreq: governors: Fix CPUFREQ_GOV_POLICY_{INIT|EXIT} notifiers
cpufreq: Issue CPUFREQ_GOV_POLICY_EXIT notifier before dropping
policy refcount
drivers/cpufreq/cpufreq.c | 6 +++---
drivers/cpufreq/cpufreq_governor.c | 11 +++++++----
drivers/cpufreq/cpufreq_governor.h | 1 +
3 files changed, 11 insertions(+), 7 deletions(-)
--
1.7.12.rc2.18.g61b472e