* [PATCH] musb: Export musb_root_disconnect for use in modules
From: Greg Kroah-Hartman @ 2016-09-16 15:47 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20160916145936.3297-1-hdegoede@redhat.com>
On Fri, Sep 16, 2016 at 04:59:36PM +0200, Hans de Goede wrote:
> Export musb_root_disconnect for use in modules, so that musb glue
> code build as module can use it.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
> drivers/usb/musb/musb_virthub.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c
> index fe08e77..61b5f1c 100644
> --- a/drivers/usb/musb/musb_virthub.c
> +++ b/drivers/usb/musb/musb_virthub.c
> @@ -245,6 +245,7 @@ void musb_root_disconnect(struct musb *musb)
> usb_otg_state_string(musb->xceiv->otg->state));
> }
> }
> +EXPORT_SYMBOL_GPL(musb_root_disconnect);
>
>
> /*---------------------------------------------------------------------*/
Does this fix a build error somehow? Who reported it?
^ permalink raw reply
* [PATCH v3 0/2] KVM: ARM: Enable vtimers with user space gic
From: Paolo Bonzini @ 2016-09-16 15:45 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20160916134619.jjiaplhxgkkl5qri@kamzik.localdomain>
On 16/09/2016 15:46, Andrew Jones wrote:
> > But I haven't even looked at the patches in detail, I was just replying
> > to the comment about testing.
>
> This may be a great time to start encouraging feature writers to submit
> kvm-unit-tests patches at the same time as the feature (Hi Alex :-) I'm
> happy to help when a test isn't easy to write due to a lack of framework,
> but don't have nearly enough bandwidth to write all the tests myself.
In this case really a kernel smoke test can just work. But yes,
architectural timer tests would be nice too.
> As for additional motivation for this series, I'll point out that it's
> good for bug isolation. When a guest fails to boot over KVM I can try
> TCG. If that works, then I've likely narrowed it to KVM. If I can
> further try kernel_irqchip=no, then I may further narrow it down to
> the vgic implementation.
(Or vice versa to the userspace GIC if you're looking at a TCG bug).
Paolo
^ permalink raw reply
* [PATCH v9 07/10] arm: arm64: pmu: Assign platform PMU CPU affinity
From: Jeremy Linton @ 2016-09-16 15:35 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20160916132953.GR3380@arm.com>
Hi
Thanks for taking a look at this..
On 09/16/2016 08:29 AM, Will Deacon wrote:
> On Wed, Sep 14, 2016 at 05:32:35PM -0500, Jeremy Linton wrote:
>> On systems with multiple PMU types the PMU to CPU affinity
>> needs to be detected and set. The CPU to interrupt affinity
>> should also be set.
>>
(trimming)
>> continue;
>> ret = info->init(pmu);
>> + /*
>> + * if this pmu declaration is unspecified and we have
>> + * previously found a PMU on this platform then append
>> + * a PMU number to the pmu name. This avoids changing
>> + * the names of PMUs that are specific to a class of CPUs.
>> + * The assumption is that if we match a specific PMU in the
>> + * provided pmu_probe_info then it's unique, and another PMU
>> + * in the system will match a different entry rather than
>> + * needing the _number to assure its unique.
>> + */
>> + if ((!info->cpuid) && (duplicate_pmus)) {
>
> Hmm, the duplicate_pmus check looks a little odd here. Doesn't it mean
> that you'd end up with things like:
>
> "arm,armv8-pmuv3"
> "arm,armv8-pmuv3_1"
>
> which looks needlessly fiddly to parse. Is this intentional?
Well, IIRC, you recommend that format, or maybe I misunderstood. Anyway,
per the comment I'm trying to assure that legacy platform devices don't
accidentally get a "_X" appended to their name and break something.
Further, by itself the name itself doesn't have any meaning/ordering and
could just as well be a random string. So, I don't think anyone is going
to try and parse it except to compare it as a whole something like
"armv8_cortex_a53". Which is why the cpu affinity is required.
Additionally, doing it this way allows a tiny tweak to the pmu table in
the future to re-enable meaningful PMU names. Lastly, its big.little
exclusive, so I would rather apply pain to non-existant big.little
server machines, than uglify the common case.
^ permalink raw reply
* [PATCH] pcie: qcom: add support to msm8996 PCIE controller
From: Srinivas Kandagatla @ 2016-09-16 15:34 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20160916141708.GA21504@rob-hp-laptop>
Thanks for the Review,
On 16/09/16 15:17, Rob Herring wrote:
> On Wed, Sep 07, 2016 at 12:06:52PM +0100, Srinivas Kandagatla wrote:
>
...
>>
>> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.txt b/Documentation/devicetree/bindings/pci/qcom,pcie.txt
>> index 4059a6f..1ddfcb4 100644
>> --- a/Documentation/devicetree/bindings/pci/qcom,pcie.txt
>> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.txt
>> @@ -92,6 +92,18 @@
...
>> Definition: A phandle and power domain specifier pair to the
>> power domain which is responsible for collapsing
>> @@ -137,6 +156,11 @@
>> Definition: A phandle to the analog power supply for IC which generates
>> reference clock
>>
>> +- vdda_1p8-supply:
>
> Don't use '_' in property names.
Will fix it and example to match these properties in next version.
>
>> + Usage: required for msm8996/apq8096
>> + Value type: <phandle>
>> + Definition: A phandle to the analog power supply for PCIE_1P8
>> +
>> - phys:
>> Usage: required for apq8084
>> Value type: <phandle>
>> @@ -231,3 +255,65 @@
>> pinctrl-0 = <&pcie0_pins_default>;
>> pinctrl-names = "default";
>> };
>> +
>> +* Example for apq8096:
>> + pcie1: qcom,pcie at 00608000 {
>
> pcie at ...
Yep, will fix it in next version.
>
>> + compatible = "qcom,pcie-msm8996", "snps,dw-pcie";
>> + power-domains = <&gcc PCIE1_GDSC>;
>> + bus-range = <0x00 0xff>;
>> + num-lanes = <1>;
>> +
>> + status = "disabled";
>> +
>> + reg = <0x00608000 0x2000>,
>> + <0x0d000000 0xf1d>,
>> + <0x0d000f20 0xa8>,
>> + <0x0d100000 0x100000>;
>> +
^ permalink raw reply
* [PATCH v4 2/2] soc: qcom: add l2 cache perf events driver
From: Neil Leeder @ 2016-09-16 15:33 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20160901163051.GA6731@leverpostej>
Hi Mark,
Thank you for the thorough review. I will post an updated patchset which addresses
all of your comments. There is just one outstanding comment which I have a question about:
On 9/1/2016 12:30 PM, Mark Rutland wrote:
> On Tue, Aug 30, 2016 at 01:01:33PM -0400, Neil Leeder wrote:
>> +static int l2_cache__event_init(struct perf_event *event)
>> +{
>> + struct hw_perf_event *hwc = &event->hw;
>> + struct hml2_pmu *slice;
>> + struct perf_event *sibling;
>> + struct l2cache_pmu *l2cache_pmu = to_l2cache_pmu(event->pmu);
>> +
>> + if (event->attr.type != l2cache_pmu->pmu.type)
>> + return -ENOENT;
>> +
>> + if (hwc->sample_period) {
>> + dev_warn(&l2cache_pmu->pdev->dev, "Sampling not supported\n");
>> + return -EOPNOTSUPP;
>> + }
>> +
>> + if (event->cpu < 0) {
>> + dev_warn(&l2cache_pmu->pdev->dev, "Per-task mode not supported\n");
>> + return -EOPNOTSUPP;
>> + }
>> +
>> + /* We cannot filter accurately so we just don't allow it. */
>> + if (event->attr.exclude_user || event->attr.exclude_kernel ||
>> + event->attr.exclude_hv || event->attr.exclude_idle) {
>> + dev_warn(&l2cache_pmu->pdev->dev, "Can't exclude execution levels\n");
>> + return -EOPNOTSUPP;
>> + }
>> +
>> + if (((L2_EVT_GROUP(event->attr.config) > L2_EVT_GROUP_MAX) ||
>> + (L2_EVT_PREFIX(event->attr.config) != 0) ||
>> + (L2_EVT_REG(event->attr.config) != 0)) &&
>> + (event->attr.config != L2CYCLE_CTR_RAW_CODE)) {
>> + dev_warn(&l2cache_pmu->pdev->dev, "Invalid config %llx\n",
>> + event->attr.config);
>> + return -EINVAL;
>> + }
>> +
>> + /* Don't allow groups with mixed PMUs, except for s/w events */
>> + if (event->group_leader->pmu != event->pmu &&
>> + !is_software_event(event->group_leader)) {
>> + dev_warn(&l2cache_pmu->pdev->dev,
>> + "Can't create mixed PMU group\n");
>> + return -EINVAL;
>> + }
>> +
>> + list_for_each_entry(sibling, &event->group_leader->sibling_list,
>> + group_entry)
>> + if (sibling->pmu != event->pmu &&
>> + !is_software_event(sibling)) {
>> + dev_warn(&l2cache_pmu->pdev->dev,
>> + "Can't create mixed PMU group\n");
>> + return -EINVAL;
>> + }
>> +
>> + hwc->idx = -1;
>> + hwc->config_base = event->attr.config;
>> +
>> + /*
>> + * Ensure all events are on the same cpu so all events are in the
>> + * same cpu context, to avoid races on pmu_enable etc.
>> + */
>> + slice = get_hml2_pmu(event->cpu);
>> + event->cpu = slice->on_cpu;
>
> This could put an event on a different CPU to its group siblings, which
> is broken.
This is the same logic as in arm-ccn.c:arm_ccn_pmu_event_init(), where there
is a single CPU designated as the CPU to be used for all events. All
events for this slice are forced to slice->on_cpu which is the CPU set in the
cpumask for this slice.
I'm not sure how this can put an event on a different CPU to its group siblings?
Thanks,
Neil
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.
^ permalink raw reply
* [PATCH 1/2] dt-bindings: spi-meson: Add GXBB Compatible string
From: Rob Herring @ 2016-09-16 15:33 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1473321206-32284-2-git-send-email-narmstrong@baylibre.com>
On Thu, Sep 08, 2016 at 09:53:25AM +0200, Neil Armstrong wrote:
> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> ---
> Documentation/devicetree/bindings/spi/spi-meson.txt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/spi/spi-meson.txt b/Documentation/devicetree/bindings/spi/spi-meson.txt
> index bb52a86..dc6d031 100644
> --- a/Documentation/devicetree/bindings/spi/spi-meson.txt
> +++ b/Documentation/devicetree/bindings/spi/spi-meson.txt
> @@ -7,7 +7,7 @@ NOR memories, without DMA support and a 64-byte unified transmit /
> receive buffer.
>
> Required properties:
> - - compatible: should be "amlogic,meson6-spifc"
> + - compatible: should be "amlogic,meson6-spifc" or "amlogic,meson-gxbb-spifc"
If you are going to use both, make sure the order is clear (most
specific, best match first). Sometimes the chip names make that clear,
but not here.
> - reg: physical base address and length of the controller registers
> - clocks: phandle of the input clock for the baud rate generator
> - #address-cells: should be 1
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH V5] perf tools: adding support for address filters
From: Mathieu Poirier @ 2016-09-16 15:32 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20160914082535.3304d51a1a6a085234f77529@kernel.org>
On 13 September 2016 at 17:25, Masami Hiramatsu <mhiramat@kernel.org> wrote:
> On Tue, 13 Sep 2016 08:18:10 -0600
> Mathieu Poirier <mathieu.poirier@linaro.org> wrote:
>
>> On 13 September 2016 at 04:01, Adrian Hunter <adrian.hunter@intel.com> wrote:
>> > On 12/09/16 20:53, Mathieu Poirier wrote:
>> >> This patch makes it possible to use the current filter
>> >> framework with address filters. That way address filters for
>> >> HW tracers such as CoreSight and IntelPT can be communicated
>> >> to the kernel drivers.
>> >>
>> >> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
>> >>
>> >> ---
>> >> Changes for V5:
>> >> - Modified perf_evsel__append_filter() to take a string format
>> >> rather than an operation.
>> >
>> > Hope I'm not being a pain, but aren't there other places calling
>> > perf_evsel__append_filter() that need to be changed. Might make
>> > sense as a separate patch.
>>
>> No no, you're right - I completely overlooked that.
>>
>> But shouldn't it be in the same patch? That way a git bisect would
>> stay consistent...
>
> You're right. Caller and callee should be changed in atomic.
>
> BTW, could you add document updates how the perf command line
> will be changed, and also show the result in the patch description?
This patch does not change anything on the perf command line. It
simply allows current options to succeed (as they should) rather than
fail.
Thanks,
Mathieu
>
> Thank you,
>
>>
>> >
>> >>
>> >> Changes for V4:
>> >> - Added support for address filters over more than one
>> >> nibble.
>> >> - Removed Jiri's ack, this version is too different from
>> >> what was reviewed.
>> >>
>> >> Changes for V3:
>> >> - Added Jiri's ack.
>> >> - Rebased to v4.8-rc5.
>> >>
>> >> Changes for V2:
>> >> - Rebased to v4.8-rc4.
>> >> - Revisited error path.
>> >>
>> >>
>> >> tools/perf/util/evsel.c | 4 ++--
>> >> tools/perf/util/evsel.h | 2 +-
>> >> tools/perf/util/parse-events.c | 40 +++++++++++++++++++++++++++++++++++-----
>> >> 3 files changed, 38 insertions(+), 8 deletions(-)
>> >>
>> >> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
>> >> index d40f852d2de2..a9bb277f221f 100644
>> >> --- a/tools/perf/util/evsel.c
>> >> +++ b/tools/perf/util/evsel.c
>> >> @@ -1047,14 +1047,14 @@ int perf_evsel__set_filter(struct perf_evsel *evsel, const char *filter)
>> >> }
>> >>
>> >> int perf_evsel__append_filter(struct perf_evsel *evsel,
>> >> - const char *op, const char *filter)
>> >> + const char *fmt, const char *filter)
>> >> {
>> >> char *new_filter;
>> >>
>> >> if (evsel->filter == NULL)
>> >> return perf_evsel__set_filter(evsel, filter);
>> >>
>> >> - if (asprintf(&new_filter,"(%s) %s (%s)", evsel->filter, op, filter) > 0) {
>> >> + if (asprintf(&new_filter, fmt, evsel->filter, filter) > 0) {
>> >> free(evsel->filter);
>> >> evsel->filter = new_filter;
>> >> return 0;
>> >> diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
>> >> index 8ceb7ebb51f5..50595c8c7207 100644
>> >> --- a/tools/perf/util/evsel.h
>> >> +++ b/tools/perf/util/evsel.h
>> >> @@ -236,7 +236,7 @@ void perf_evsel__set_sample_id(struct perf_evsel *evsel,
>> >>
>> >> int perf_evsel__set_filter(struct perf_evsel *evsel, const char *filter);
>> >> int perf_evsel__append_filter(struct perf_evsel *evsel,
>> >> - const char *op, const char *filter);
>> >> + const char *fmt, const char *filter);
>> >> int perf_evsel__apply_filter(struct perf_evsel *evsel, int ncpus, int nthreads,
>> >> const char *filter);
>> >> int perf_evsel__apply_drv_configs(struct perf_evsel *evsel,
>> >> diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
>> >> index 2eb8b1ed4cc8..8e683979ccd8 100644
>> >> --- a/tools/perf/util/parse-events.c
>> >> +++ b/tools/perf/util/parse-events.c
>> >> @@ -1760,20 +1760,50 @@ foreach_evsel_in_last_glob(struct perf_evlist *evlist,
>> >> static int set_filter(struct perf_evsel *evsel, const void *arg)
>> >> {
>> >> const char *str = arg;
>> >> + bool found = false;
>> >> + int nr_addr_filters = 0;
>> >> + struct perf_pmu *pmu = NULL;
>> >>
>> >> - if (evsel == NULL || evsel->attr.type != PERF_TYPE_TRACEPOINT) {
>> >> - fprintf(stderr,
>> >> - "--filter option should follow a -e tracepoint option\n");
>> >> - return -1;
>> >> + if (evsel == NULL)
>> >> + goto err;
>> >> +
>> >> + if (evsel->attr.type == PERF_TYPE_TRACEPOINT) {
>> >> + if (perf_evsel__append_filter(evsel,
>> >> + "(%s) && (%s)", str) < 0) {
>> >> + fprintf(stderr,
>> >> + "not enough memory to hold filter string\n");
>> >> + return -1;
>> >> + }
>> >> +
>> >> + return 0;
>> >> }
>> >>
>> >> - if (perf_evsel__append_filter(evsel, "&&", str) < 0) {
>> >> + while ((pmu = perf_pmu__scan(pmu)) != NULL)
>> >> + if (pmu->type == evsel->attr.type) {
>> >> + found = true;
>> >> + break;
>> >> + }
>> >> +
>> >> + if (found)
>> >> + perf_pmu__scan_file(pmu, "nr_addr_filters",
>> >> + "%d", &nr_addr_filters);
>> >> +
>> >> + if (!nr_addr_filters)
>> >> + goto err;
>> >> +
>> >> + if (perf_evsel__append_filter(evsel, "%s,%s", str) < 0) {
>> >> fprintf(stderr,
>> >> "not enough memory to hold filter string\n");
>> >> return -1;
>> >> }
>> >>
>> >> return 0;
>> >> +
>> >> +err:
>> >> + fprintf(stderr,
>> >> + "--filter option should follow a -e tracepoint or HW tracer option\n");
>> >> +
>> >> + return -1;
>> >> }
>> >>
>> >> int parse_filter(const struct option *opt, const char *str,
>> >>
>> >
>
>
> --
> Masami Hiramatsu <mhiramat@kernel.org>
^ permalink raw reply
* [PATCH 0/2] spi: meson: Add Amlogic GXBB compatible
From: Rob Herring @ 2016-09-16 15:28 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <4a199a95-3ee6-a3a0-bc8a-63bd0912e7d2@suse.de>
On Thu, Sep 08, 2016 at 02:50:37PM +0200, Andreas F?rber wrote:
> Am 08.09.2016 um 14:04 schrieb Andreas F?rber:
> > Am 08.09.2016 um 09:53 schrieb Neil Armstrong:
> >> This patchset adds a specific compatible string in the Meson SPIFC driver for
> >> the Amlogic Meson GXBB SoC.
> >
> > Any particular reason? We could just reuse the meson6 one since there
> > appear to be no code changes so far.
>
> So Neil is essentially telling me they don't know whether there are any
> differences in the IP block, so a separate compatible string was chosen.
>
> No objection from my side, but a general clarification from device tree
> maintainers when and when not to would be appreciated. (+ devicetree)
New chip, always define a new compatible. If you think they are the same
or are close enough to function with the existing driver, then put both
compatible strings in the DT.
Rob
^ permalink raw reply
* [PATCH v6 3/3] devicetree: bindings: Add vendor prefix for Topeet.
From: Rob Herring @ 2016-09-16 15:24 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1473285535-21996-4-git-send-email-ayaka@soulik.info>
On Thu, Sep 08, 2016 at 05:58:55AM +0800, Randy Li wrote:
> Add TOPEET, a ARM devlopment board vendor in China mainland.
>
> Signed-off-by: Randy Li <ayaka@soulik.info>
> ---
> Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
> 1 file changed, 1 insertion(+)
I applied this one to avoid any merge conflicts with fixing
alphabetizing of this file this cycle.
Rob
^ permalink raw reply
* [PATCH v4 22/22] phy: Add support for Qualcomm's USB HS phy
From: Rob Herring @ 2016-09-16 15:19 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20160907213519.27340-23-stephen.boyd@linaro.org>
On Wed, Sep 07, 2016 at 02:35:19PM -0700, Stephen Boyd wrote:
> The high-speed phy on qcom SoCs is controlled via the ULPI
> viewport.
>
> Cc: Kishon Vijay Abraham I <kishon@ti.com>
> Cc: <devicetree@vger.kernel.org>
> Signed-off-by: Stephen Boyd <stephen.boyd@linaro.org>
> ---
> .../devicetree/bindings/phy/qcom,usb-hs-phy.txt | 83 ++++++
> drivers/phy/Kconfig | 8 +
> drivers/phy/Makefile | 1 +
> drivers/phy/phy-qcom-usb-hs.c | 289 +++++++++++++++++++++
> 4 files changed, 381 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt
> create mode 100644 drivers/phy/phy-qcom-usb-hs.c
>
> diff --git a/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt b/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt
> new file mode 100644
> index 000000000000..d7eacd63d06b
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/qcom,usb-hs-phy.txt
> @@ -0,0 +1,83 @@
> +Qualcomm's USB HS PHY
> +
> +PROPERTIES
> +
> +- compatible:
> + Usage: required
> + Value type: <string>
> + Definition: Should contain "qcom,usb-hs-phy" and more specifically one of the
> + following:
> +
> + "qcom,usb-hs-phy-apq8064"
> + "qcom,usb-hs-phy-msm8916"
> + "qcom,usb-hs-phy-msm8974"
This is fine, but things are usually named <soc>-<ipblock>.
> +
> +- #phy-cells:
> + Usage: required
> + Value type: <u32>
> + Definition: Should contain 0
> +
> +- clocks:
> + Usage: required
> + Value type: <prop-encoded-array>
> + Definition: Should contain clock specifier for the reference and sleep
> + clocks
> +
> +- clock-names:
> + Usage: required
> + Value type: <stringlist>
> + Definition: Should contain "ref" and "sleep" for the reference and sleep
> + clocks respectively
> +
> +- resets:
> + Usage: required
> + Value type: <prop-encoded-array>
> + Definition: Should contain the phy and POR resets
> +
> +- reset-names:
> + Usage: required
> + Value type: <stringlist>
> + Definition: Should contain "phy" and "por" for the phy and POR resets
> + respectively
> +
> +- v3p3-supply:
> + Usage: required
> + Value type: <phandle>
> + Definition: Should contain a reference to the 3.3V supply
> +
> +- v1p8-supply:
> + Usage: required
> + Value type: <phandle>
> + Definition: Should contain a reference to the 1.8V supply
> +
> +- extcon:
I don't recommend using extcon binding. It needs some work to put it
nicely.
> + Usage: optional
> + Value type: <prop-encoded-array>
> + Definition: Should contain the vbus and ID extcons in the first and second
> + cells respectively
> +
> +- qcom,init-seq:
> + Usage: optional
> + Value type: <u8 array>
> + Definition: Should contain a sequence of ULPI register and address pairs to
> + program into the ULPI_EXT_VENDOR_SPECIFIC area. This is related
> + to Device Mode Eye Diagram test.
We generally nak this type of property. For 1 register I don't care so
much. For 100, that would be another story.
Is this value per unit, per board, per SoC? Can you limit it to certain
registers?
> +
> +EXAMPLE
> +
> +otg: usb-controller {
> + ulpi {
> + phy {
> + compatible = "qcom,usb-hs-phy-msm8974", "qcom,usb-hs-phy";
> + #phy-cells = <0>;
> + clocks = <&xo_board>, <&gcc GCC_USB2A_PHY_SLEEP_CLK>;
> + clock-names = "ref", "sleep";
> + resets = <&gcc GCC_USB2A_PHY_BCR>, <&otg 0>;
> + reset-names = "phy", "por";
> + v3p3-supply = <&pm8941_l24>;
> + v1p8-supply = <&pm8941_l6>;
> + extcon = <&smbb>, <&usb_id>;
> + qcom,init-seq = /bits/ 8 <0x81 0x63>;
> + };
> + };
> +};
^ permalink raw reply
* [PATCH v4 2/2] ARM: dts: sun8i: enable UART1 for iNet D978 Rev2 board
From: Icenowy Zheng @ 2016-09-16 15:16 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20160916151642.27907-1-icenowy@aosc.xyz>
UART1 is connected to the bluetooth part of RTL8723BS WiFi/BT combo card
on iNet D978 Rev2 board.
Enable the UART1 to make it possible to use the modified hciattach by
Realtek to drive the BT part of RTL8723BS.
On the board no r_uart pins are found now (the onboard RX/TX pins are
wired to PF2/PF4, which is muxed with mmc0), so also disabled it.
Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
---
Changes since v4:
- Split the pinmux part into another patch.
Changes since v3:
- Change bluetooth to serial0.
Changes since v2:
- Remove stdout-path.
arch/arm/boot/dts/sun8i-a33-inet-d978-rev2.dts | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-a33-inet-d978-rev2.dts b/arch/arm/boot/dts/sun8i-a33-inet-d978-rev2.dts
index 0f52cd9..fb46655 100644
--- a/arch/arm/boot/dts/sun8i-a33-inet-d978-rev2.dts
+++ b/arch/arm/boot/dts/sun8i-a33-inet-d978-rev2.dts
@@ -49,6 +49,15 @@
model = "INet-D978 Rev 02";
compatible = "primux,inet-d978-rev2", "allwinner,sun8i-a33";
+ aliases {
+ serial0 = &uart1;
+ };
+
+ chosen {
+ /* Delete debug UART as serial0 is the UART for bluetooth */
+ /delete-property/stdout-path;
+ };
+
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
@@ -86,3 +95,14 @@
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
};
+
+&r_uart {
+ status = "disabled";
+};
+
+&uart1 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart1_pins_a>,
+ <&uart1_pins_cts_rts_a>;
+ status = "okay";
+};
--
2.9.3
^ permalink raw reply related
* [PATCH v4 1/2] ARM: dts: sun8i: add pinmux for UART1 at PG
From: Icenowy Zheng @ 2016-09-16 15:16 UTC (permalink / raw)
To: linux-arm-kernel
The UART1 at PG (PG6, PG7, PG8, PG9) is, in the Allwinner's reference
tablet design of A23/33, used to connect to UART Bluetooth cards.
Add the pinmux for it.
Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
---
This patch is splited in v4.
arch/arm/boot/dts/sun8i-a23-a33.dtsi | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm/boot/dts/sun8i-a23-a33.dtsi b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
index 7e05e09..c340885 100644
--- a/arch/arm/boot/dts/sun8i-a23-a33.dtsi
+++ b/arch/arm/boot/dts/sun8i-a23-a33.dtsi
@@ -361,6 +361,20 @@
allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
};
+ uart1_pins_a: uart1 at 0 {
+ allwinner,pins = "PG6", "PG7";
+ allwinner,function = "uart1";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+
+ uart1_pins_cts_rts_a: uart1-cts-rts at 0 {
+ allwinner,pins = "PG8", "PG9";
+ allwinner,function = "uart1";
+ allwinner,drive = <SUN4I_PINCTRL_10_MA>;
+ allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
+ };
+
mmc0_pins_a: mmc0 at 0 {
allwinner,pins = "PF0", "PF1", "PF2",
"PF3", "PF4", "PF5";
--
2.9.3
^ permalink raw reply related
* [RFC PATCH 2/8] thread_info: allow custom in-task thread_info
From: Andy Lutomirski @ 2016-09-16 15:11 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20160916103101.GA21702@leverpostej>
> On Thu, Sep 15, 2016 at 11:37:47AM -0700, Andy Lutomirski wrote:
> > On Thu, Sep 15, 2016 at 6:49 AM, Mark Rutland <mark.rutland@arm.com> wrote:
> > > Currently, task_struct is defined in <linux/sched.h>, which (indirectly)
> > > pulls in a number of low-level arch headers such as <asm/preempt.h>
> > > through a number of other headers. Thus, code and structures in these
> > > headers can't rely on the definition of task_struct. Some of these
> > > headers are necessary for the definition of task_struct, so moving
> > > task_struct into its own header is insufficient tio avoid circular
> > > includes.
> >
> > The flippant answer is to fix the headers, but I tried that myself and
> > gave up :(
>
> Agreed; likewise (though I gave up quicker, I suspect). :(
>
> Longer-term I'd still hope that we can do this.
>
> > But how about this slightly less duplicative alternative:
> >
> > struct thread_info {
> > #ifdef arch_thread_info
> > struct arch_thread_info arch_ti;
> > #endif
> > };
>
> I'm happy to have an arch_thread_info.
>
> Just to check, what do you mean to happen with the flags field? Should
> that always be in the generic thread_info? e.g.
>
> struct thread_info {
> u32 flags;
> #ifdef arch_thread_info
> struct arch_thread_info arch_ti;
> #endif
> };
Exactly. Possibly with a comment that using thread_struct should be
preferred and that arch_thread_info should be used only if some header
file requires access via current_thread_info() or task_thread_info().
--Andy
>
> Thanks,
> Mark,
^ permalink raw reply
* [GIT PULL] ARM: SoC fixes for 4.8-rc7
From: Arnd Bergmann @ 2016-09-16 15:02 UTC (permalink / raw)
To: linux-arm-kernel
The following changes since commit 95390e3290e8bf69091116e0d91b9754c0e93a24:
Merge tag 'sunxi-fixes-for-4.8' of https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux into fixes (2016-09-07 21:25:08 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc.git tags/fixes-for-linus
for you to fetch changes up to 6408649115cfd73d6807398d04b2ba564db9211e:
Merge tag 'samsung-fixes-4.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux into fixes (2016-09-16 16:29:48 +0200)
----------------------------------------------------------------
ARM: SoC fixes
Here are a couple of bugfixes for v4.8-rc. Most of them have
actually been around for a while this time but for some reason
didn't get applied early on. The shmobile regulator fix is the
only one that isn't completely obvious.
device tree changes:
- archtimer interrupts must be level triggered (multiple platforms)
- fix for USB and MMC clocks on STiH410
- fix split DT repository in case of raspberry-pi 3
- A new use of skeleton.dtsi on arm64 has crept in after that
was removed.
defconfig updates:
- xilinx vdma has a new Kconfig symbol name
- keystone requires CONFIG_NOP_USB_XCEIV since v4.8-rc1
code fixes:
- fix regulator quirk on shmobile
- suspend-to-ram regression on EXYNOS
maintainer updates:
- Javier Martinez Canillas is now a reviewer for Samsung EXYNOS
----------------------------------------------------------------
Arnd Bergmann (4):
Merge tag 'renesas-fixes-for-v4.8' of git://git.kernel.org/.../horms/renesas into fixes
Merge tag 'sti-dt-fixes-for-v4.8-rcs' of git://git.kernel.org/.../pchotard/sti into fixes
Merge branch 'dt/irq-fix' into fixes
Merge tag 'samsung-fixes-4.8-2' of git://git.kernel.org/.../krzk/linux into fixes
Fabian Frederick (1):
ARM: multi_v7_defconfig: update XILINX_VDMA
Ian Campbell (2):
ARM: dts: Remove use of skeleton.dtsi from bcm283x.dtsi
ARM64: dts: bcm: Use a symlink to R-Pi dtsi files from arch=arm
Javier Martinez Canillas (2):
MAINTAINERS: Add myself as reviewer for Samsung Exynos support
ARM: EXYNOS: Clear OF_POPULATED flag from PMU node in IRQ init callback
Lee Jones (2):
ARM: dts: STiH410: Handle interconnect clock required by EHCI/OHCI (USB)
ARM: dts: STiH407-family: Provide interconnect clock for consumption in ST SDHCI
Marc Zyngier (1):
arm64: dts: Fix broken architected timer interrupt trigger
Roger Quadros (1):
ARM: keystone: defconfig: Fix USB configuration
Wolfram Sang (1):
ARM: shmobile: fix regulator quirk for Gen2
MAINTAINERS | 1 +
arch/arm/boot/dts/bcm2835-rpi.dtsi | 1 +
arch/arm/boot/dts/bcm283x.dtsi | 3 +-
arch/arm/boot/dts/stih407-family.dtsi | 10 ++--
arch/arm/boot/dts/stih410.dtsi | 12 +++--
arch/arm/configs/keystone_defconfig | 1 +
arch/arm/configs/multi_v7_defconfig | 2 +-
arch/arm/mach-exynos/suspend.c | 6 +++
arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c | 62 +++++++++-------------
arch/arm64/boot/dts/altera/socfpga_stratix10.dtsi | 8 +--
arch/arm64/boot/dts/amlogic/meson-gxbb.dtsi | 8 +--
arch/arm64/boot/dts/apm/apm-storm.dtsi | 8 +--
arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi | 1 +
arch/arm64/boot/dts/broadcom/bcm2837-rpi-3-b.dts | 4 +-
arch/arm64/boot/dts/broadcom/bcm2837.dtsi | 2 +-
.../boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi | 1 +
arch/arm64/boot/dts/broadcom/bcm283x.dtsi | 1 +
arch/arm64/boot/dts/broadcom/ns2.dtsi | 8 +--
arch/arm64/boot/dts/cavium/thunder-88xx.dtsi | 8 +--
arch/arm64/boot/dts/exynos/exynos7.dtsi | 8 +--
arch/arm64/boot/dts/freescale/fsl-ls1043a.dtsi | 8 +--
arch/arm64/boot/dts/freescale/fsl-ls2080a.dtsi | 8 +--
arch/arm64/boot/dts/marvell/armada-ap806.dtsi | 8 +--
.../boot/dts/socionext/uniphier-ph1-ld20.dtsi | 8 +--
arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 8 +--
25 files changed, 102 insertions(+), 93 deletions(-)
create mode 120000 arch/arm64/boot/dts/broadcom/bcm2835-rpi.dtsi
create mode 120000 arch/arm64/boot/dts/broadcom/bcm283x-rpi-smsc9514.dtsi
create mode 120000 arch/arm64/boot/dts/broadcom/bcm283x.dtsi
^ permalink raw reply
* [RESEND PATCH v7 2/2] sdhci-of-arasan: Set controller to test mode when xlnx, fails-without-test-cd is present
From: Zach Brown @ 2016-09-16 15:01 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1474038102-20937-1-git-send-email-zach.brown@ni.com>
The sdhci controller on xilinx zynq devices will not function unless
the CD bit is provided. http://www.xilinx.com/support/answers/61064.html
In cases where it is impossible to provide the CD bit in hardware,
setting the controller to test mode and then setting inserted to true
will get the controller to function without the CD bit.
When the device has the property xlnx,fails-without-test-cd the driver
changes the controller to test mode and sets test inserted to true to
make the controller function.
Signed-off-by: Zach Brown <zach.brown@ni.com>
---
drivers/mmc/host/sdhci-of-arasan.c | 27 ++++++++++++++++++++++++++-
drivers/mmc/host/sdhci.h | 2 ++
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c
index 33601a8..da8e40a 100644
--- a/drivers/mmc/host/sdhci-of-arasan.c
+++ b/drivers/mmc/host/sdhci-of-arasan.c
@@ -26,6 +26,7 @@
#include <linux/phy/phy.h>
#include <linux/regmap.h>
#include "sdhci-pltfm.h"
+#include <linux/of.h>
#define SDHCI_ARASAN_CLK_CTRL_OFFSET 0x2c
#define SDHCI_ARASAN_VENDOR_REGISTER 0x78
@@ -98,6 +99,10 @@ struct sdhci_arasan_data {
struct regmap *soc_ctl_base;
const struct sdhci_arasan_soc_ctl_map *soc_ctl_map;
+ unsigned int quirks; /* Arasan deviations from spec */
+
+/* Controller does not have CD wired and will not function normally without */
+#define SDHCI_ARASAN_QUIRK_FORCE_CDTEST BIT(0)
};
static const struct sdhci_arasan_soc_ctl_map rk3399_soc_ctl_map = {
@@ -245,12 +250,27 @@ static void sdhci_arasan_hs400_enhanced_strobe(struct mmc_host *mmc,
writel(vendor, host->ioaddr + SDHCI_ARASAN_VENDOR_REGISTER);
}
+void sdhci_arasan_reset(struct sdhci_host *host, u8 mask)
+{
+ u8 ctrl;
+ struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+ struct sdhci_arasan_data *sdhci_arasan = sdhci_pltfm_priv(pltfm_host);
+
+ sdhci_reset(host, mask);
+
+ if (sdhci_arasan->quirks & SDHCI_ARASAN_QUIRK_FORCE_CDTEST) {
+ ctrl = sdhci_readb(host, SDHCI_HOST_CONTROL);
+ ctrl |= SDHCI_CTRL_CDTEST_INS | SDHCI_CTRL_CDTEST_EN;
+ sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);
+ }
+}
+
static struct sdhci_ops sdhci_arasan_ops = {
.set_clock = sdhci_arasan_set_clock,
.get_max_clock = sdhci_pltfm_clk_get_max_clock,
.get_timeout_clock = sdhci_arasan_get_timeout_clock,
.set_bus_width = sdhci_set_bus_width,
- .reset = sdhci_reset,
+ .reset = sdhci_arasan_reset,
.set_uhs_signaling = sdhci_set_uhs_signaling,
};
@@ -545,6 +565,7 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
struct sdhci_host *host;
struct sdhci_pltfm_host *pltfm_host;
struct sdhci_arasan_data *sdhci_arasan;
+ struct device_node *np = pdev->dev.of_node;
host = sdhci_pltfm_init(pdev, &sdhci_arasan_pdata,
sizeof(*sdhci_arasan));
@@ -599,6 +620,10 @@ static int sdhci_arasan_probe(struct platform_device *pdev)
}
sdhci_get_of_property(pdev);
+
+ if (of_property_read_bool(np, "xlnx,fails-without-test-cd"))
+ sdhci_arasan->quirks |= SDHCI_ARASAN_QUIRK_FORCE_CDTEST;
+
pltfm_host->clk = clk_xin;
if (of_device_is_compatible(pdev->dev.of_node,
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
index a2bc9e1..c722cd2 100644
--- a/drivers/mmc/host/sdhci.h
+++ b/drivers/mmc/host/sdhci.h
@@ -84,6 +84,8 @@
#define SDHCI_CTRL_ADMA32 0x10
#define SDHCI_CTRL_ADMA64 0x18
#define SDHCI_CTRL_8BITBUS 0x20
+#define SDHCI_CTRL_CDTEST_INS 0x40
+#define SDHCI_CTRL_CDTEST_EN 0x80
#define SDHCI_POWER_CONTROL 0x29
#define SDHCI_POWER_ON 0x01
--
2.7.4
^ permalink raw reply related
* [RESEND PATCH v7 1/2] sdhci-of-arasan: Add device tree parameter xlnx, fails-without-test-cd bit
From: Zach Brown @ 2016-09-16 15:01 UTC (permalink / raw)
To: linux-arm-kernel
The sdhci controller on xilinx zynq devices will not function unless
the CD bit is provided. http://www.xilinx.com/support/answers/61064.html
In cases where it is impossible to provide the CD bit in hardware,
setting the controller to test mode and then setting inserted to true
will get the controller to function without the CD bit.
The device property "xlnx,fails-without-test-cd" will let the arasan
driver know the controller does not have the CD line wired and that the
controller does not function without it.
Signed-off-by: Zach Brown <zach.brown@ni.com>
---
v2:
* improved commit messages
* removed fake-cd device property
* removed fake-cd quirk
* use broken-cd device property
* documented new usage of broken-cd
v3:
* removed new usage of broken-cd
* created fails-without-test-cd device property
* created arasan controller specific quirk
v4:
* changed fails-without-test-cd to xlnx-fails-without-test-cd
* removed extra blank line
v5:
* Fixed style mistake
* Changed (1 << 0 ) to BIT(0)
v6:
* Fixed style mistakes
* Condensed unnecessarily long variable names
* Removed line wraps that were no longer necessary.
* Rebased changes off Ulf's mmc tree's next branch.
v7:
* Removed erroneous re-creation of Optional Properties section
* Changed xlnx-fails-without-test-cd to xlnx,fails-without-test-cd
* Changed of_get_property to of_property_read_bool
Documentation/devicetree/bindings/mmc/arasan,sdhci.txt | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt
index 3404afa..49df630 100644
--- a/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt
+++ b/Documentation/devicetree/bindings/mmc/arasan,sdhci.txt
@@ -36,6 +36,9 @@ Optional Properties:
- #clock-cells: If specified this should be the value <0>. With this property
in place we will export a clock representing the Card Clock. This clock
is expected to be consumed by our PHY. You must also specify
+ - xlnx,fails-without-test-cd: when present, the controller doesn't work when
+ the CD line is not connected properly, and the line is not connected
+ properly. Test mode can be used to force the controller to function.
Example:
sdhci at e0100000 {
--
2.7.4
^ permalink raw reply related
* [PATCH] musb: Export musb_root_disconnect for use in modules
From: Hans de Goede @ 2016-09-16 14:59 UTC (permalink / raw)
To: linux-arm-kernel
Export musb_root_disconnect for use in modules, so that musb glue
code build as module can use it.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/usb/musb/musb_virthub.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/usb/musb/musb_virthub.c b/drivers/usb/musb/musb_virthub.c
index fe08e77..61b5f1c 100644
--- a/drivers/usb/musb/musb_virthub.c
+++ b/drivers/usb/musb/musb_virthub.c
@@ -245,6 +245,7 @@ void musb_root_disconnect(struct musb *musb)
usb_otg_state_string(musb->xceiv->otg->state));
}
}
+EXPORT_SYMBOL_GPL(musb_root_disconnect);
/*---------------------------------------------------------------------*/
--
2.9.3
^ permalink raw reply related
* next-20160915 build: 2 failures 16 warnings (next-20160915)
From: Hans de Goede @ 2016-09-16 14:59 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20160915154140.GM27974@sirena.org.uk>
Hi,
On 15-09-16 17:41, Mark Brown wrote:
> On Thu, Sep 15, 2016 at 12:43:41PM +0100, Build bot for Mark Brown wrote:
>
> Today's -next fails to build both arm and arm64 allmodconfigs due to:
>
>> arm64-allmodconfig
>> ERROR: "musb_root_disconnect" [drivers/usb/musb/sunxi.ko] undefined!
>
>> arm-allmodconfig
>> ERROR: "musb_root_disconnect" [drivers/usb/musb/sunxi.ko] undefined!
>
> due to 7cba17ec9adc8cf (musb: sunxi: Add support for platform_set_mode)
> which adds a call to that non-exported function to a module.
Thank you for catching / reporting this. One patch fixing this
coming up.
Regards,
Hans
^ permalink raw reply
* [PATCH v26 3/7] arm64: kdump: add kdump support
From: James Morse @ 2016-09-16 14:50 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20160907042908.6232-4-takahiro.akashi@linaro.org>
On 07/09/16 05:29, AKASHI Takahiro wrote:
> On crash dump kernel, all the information about primary kernel's system
> memory (core image) is available in elf core header.
> The primary kernel will set aside this header with reserve_elfcorehdr()
> at boot time and inform crash dump kernel of its location via a new
> device-tree property, "linux,elfcorehdr".
>
> Please note that all other architectures use traditional "elfcorehdr="
> kernel parameter for this purpose.
>
> Then crash dump kernel will access the primary kernel's memory with
> copy_oldmem_page(), which reads one page by ioremap'ing it since it does
> not reside in linear mapping on crash dump kernel.
>
> We also need our own elfcorehdr_read() here since the header is placed
> within crash dump kernel's usable memory.
One nit below, looks good.
Reviewed-by: James Morse <james.morse@arm.com>
Thanks,
James
> diff --git a/arch/arm64/kernel/crash_dump.c b/arch/arm64/kernel/crash_dump.c
> +/**
> + * copy_oldmem_page() - copy one page from old kernel memory
> + * @pfn: page frame number to be copied
> + * @buf: buffer where the copied page is placed
> + * @csize: number of bytes to copy
> + * @offset: offset in bytes into the page
> + * @userbuf: if set, @buf is in a user address space
> + *
> + * This function copies one page from old kernel memory into buffer pointed by
> + * @buf. If @buf is in userspace, set @userbuf to %1. Returns number of bytes
> + * copied or negative error in case of failure.
> + */
> +ssize_t copy_oldmem_page(unsigned long pfn, char *buf,
> + size_t csize, unsigned long offset,
> + int userbuf)
> +{
> + void *vaddr;
> +
> + if (!csize)
> + return 0;
> +
> + vaddr = memremap(__pfn_to_phys(pfn), PAGE_SIZE, MEMREMAP_WB);
> + if (!vaddr)
> + return -ENOMEM;
> +
> + if (userbuf) {
> + if (copy_to_user(buf, vaddr + offset, csize)) {
If you re-cast buf with (char __user *), it should stop sparse complaining:
> ../arch/arm64/kernel/crash_dump.c:45:34: warning: incorrect type in argument 1
(different address spaces)
> ../arch/arm64/kernel/crash_dump.c:45:34: expected void [noderef] <asn:1>*to
> ../arch/arm64/kernel/crash_dump.c:45:34: got char *buf
^ permalink raw reply
* [PATCH v26 2/7] arm64: kdump: implement machine_crash_shutdown()
From: James Morse @ 2016-09-16 14:49 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20160915114815.GK16712@linaro.org>
On 16/09/16 04:21, AKASHI Takahiro wrote:
> On Wed, Sep 14, 2016 at 07:09:33PM +0100, James Morse wrote:
>> On 07/09/16 05:29, AKASHI Takahiro wrote:
>>> Primary kernel calls machine_crash_shutdown() to shut down non-boot cpus
>>> and save registers' status in per-cpu ELF notes before starting crash
>>> dump kernel. See kernel_kexec().
>>> Even if not all secondary cpus have shut down, we do kdump anyway.
>>>
>>> As we don't have to make non-boot(crashed) cpus offline (to preserve
>>> correct status of cpus at crash dump) before shutting down, this patch
>>> also adds a variant of smp_send_stop().
>>> diff --git a/arch/arm64/include/asm/kexec.h b/arch/arm64/include/asm/kexec.h
>>> index 04744dc..a908958 100644
>>> --- a/arch/arm64/include/asm/kexec.h
>>> +++ b/arch/arm64/include/asm/kexec.h
>>> @@ -40,7 +40,46 @@
>>> static inline void crash_setup_regs(struct pt_regs *newregs,
>>> struct pt_regs *oldregs)
>>> {
>>> - /* Empty routine needed to avoid build errors. */
>>> + if (oldregs) {
>>> + memcpy(newregs, oldregs, sizeof(*newregs));
>>> + } else {
>>> + u64 tmp1, tmp2;
>>> +
>>> + __asm__ __volatile__ (
>>> + "stp x0, x1, [%2, #16 * 0]\n"
>>> + "stp x2, x3, [%2, #16 * 1]\n"
>>> + "stp x4, x5, [%2, #16 * 2]\n"
>>> + "stp x6, x7, [%2, #16 * 3]\n"
>>> + "stp x8, x9, [%2, #16 * 4]\n"
>>> + "stp x10, x11, [%2, #16 * 5]\n"
>>> + "stp x12, x13, [%2, #16 * 6]\n"
>>> + "stp x14, x15, [%2, #16 * 7]\n"
>>> + "stp x16, x17, [%2, #16 * 8]\n"
>>> + "stp x18, x19, [%2, #16 * 9]\n"
>>> + "stp x20, x21, [%2, #16 * 10]\n"
>>> + "stp x22, x23, [%2, #16 * 11]\n"
>>> + "stp x24, x25, [%2, #16 * 12]\n"
>>> + "stp x26, x27, [%2, #16 * 13]\n"
>>> + "stp x28, x29, [%2, #16 * 14]\n"
>>> + "mov %0, sp\n"
>>> + "stp x30, %0, [%2, #16 * 15]\n"
>>> +
>>> + "/* faked current PSTATE */\n"
>>> + "mrs %0, CurrentEL\n"
>>> + "mrs %1, DAIF\n"
>>> + "orr %0, %0, %1\n"
>>> + "mrs %1, NZCV\n"
>>> + "orr %0, %0, %1\n"
>>> +
>>
>> What about SPSEL? While we don't use it, it is correctly preserved for
>> everything except a CPU that calls panic()...
>
> My comment above might be confusing, but what I want to fake
> here is "spsr" as pt_regs.pstate is normally set based on spsr_el1.
> So there is no corresponding field of SPSEL in spsr.
Here is my logic, I may have missed something obvious, see what you think:
SPSR_EL{1,2} shows the CPU mode 'M' in bits 0-4, From aarch64 bit 4 is always 0.
>From the register definitions in the ARM-ARM C5.2, likely values in 0-3 are:
0100 EL1t
0101 EL1h
1000 EL2t
1001 EL2h
I'm pretty sure this least significant bit is what SPSEL changes, so it does get
implicitly recorded in SPSR.
CurrentEL returns a value in bits 0-3, of which 0-1 are RES0, so we lose the
difference between EL?t and EL?h.
>
>>
>>> + /* pc */
>>> + "adr %1, 1f\n"
>>> + "1:\n"
>>> + "stp %1, %0, [%2, #16 * 16]\n"
>>> + : "=r" (tmp1), "=r" (tmp2), "+r" (newregs)
>>> + :
>>> + : "memory"
Do you need the memory clobber? This asm only modifies values in newregs.
>>> + );
>>> + }
>>> }
>>>
>>> #endif /* __ASSEMBLY__ */
>>> diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c
>>> +#ifdef CONFIG_KEXEC_CORE
>>> +void smp_send_crash_stop(void)
>>> +{
>>> + cpumask_t mask;
>>> + unsigned long timeout;
>>> +
>>> + if (num_online_cpus() == 1)
>>> + return;
>>> +
>>> + cpumask_copy(&mask, cpu_online_mask);
>>> + cpumask_clear_cpu(smp_processor_id(), &mask);
>>> +
>>> + atomic_set(&waiting_for_crash_ipi, num_online_cpus() - 1);
>>> +
>>> + pr_crit("SMP: stopping secondary CPUs\n");
>>> + smp_cross_call(&mask, IPI_CPU_CRASH_STOP);
>>> +
>>> + /* Wait up to one second for other CPUs to stop */
>>> + timeout = USEC_PER_SEC;
>>> + while ((atomic_read(&waiting_for_crash_ipi) > 0) && timeout--)
>>> + udelay(1);
>>> +
>>> + if (atomic_read(&waiting_for_crash_ipi) > 0)
>>> + pr_warning("SMP: failed to stop secondary CPUs %*pbl\n",
>>> + cpumask_pr_args(cpu_online_mask));
>>> +}
>>> +#endif
>>
>> This is very similar to smp_send_stop() which also has the timeout. Is it
>> possible to merge them? You could use in_crash_kexec to choose the IPI type.
>
> Yeah, we could merge them along with ipi_cpu_(crash_)stop().
> But the resulting code would be quite noisy if each line
> is switched by "if (in_crash_kexec)."
> Otherwise, we may have one big "if" like:
> void smp_send_stop(void)
> {
> if (in_crash_kexec)
> ...
> else
> ...
> }
> It seems to me that it is not much different from the current code.
> What do you think?
Hmm, yes, its too fiddly to keep the existing behaviour of both.
The problems are ipi_cpu_stop() doesn't call cpu_die(), (I can't see a good
reason for this, but more archaeology is needed), and ipi_cpu_crash_stop()
doesn't modify the online cpu mask.
I don't suggest we do this yet, but it could be future cleanup if it's proved to
be safe:
smp_send_stop() is only called from: machine_halt(), machine_power_off(),
machine_restart() and panic(). In all those cases the CPUs are never expected to
come back, so we can probably merge the IPIs. This involves modifying the
online cpu mask during kdump, (which I think is fine as it uses the atomic
bitops so we won't get blocked on a lock), and promoting in_crash_kexec to some
atomic type.
But I think we should leave it as it is for now,
Thanks,
James
^ permalink raw reply
* [PATCH V7 3/3] perf tools: adding support for address filters
From: Mathieu Poirier @ 2016-09-16 14:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1474037045-31730-1-git-send-email-mathieu.poirier@linaro.org>
This patch makes it possible to use the current filter
framework with address filters. That way address filters for
HW tracers such as CoreSight and Intel PT can be communicated
to the kernel drivers.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
---
tools/perf/util/evsel.c | 5 +++++
tools/perf/util/evsel.h | 2 ++
tools/perf/util/parse-events.c | 39 ++++++++++++++++++++++++++++++++++-----
3 files changed, 41 insertions(+), 5 deletions(-)
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index a99e82d97df2..e0bb399dcdd4 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1067,6 +1067,11 @@ int perf_evsel__append_tp_filter(struct perf_evsel *evsel, const char *filter)
return perf_evsel__append_filter(evsel, "(%s) && (%s)", filter);
}
+int perf_evsel__append_addr_filter(struct perf_evsel *evsel, const char *filter)
+{
+ return perf_evsel__append_filter(evsel, "%s,%s", filter);
+}
+
int perf_evsel__enable(struct perf_evsel *evsel)
{
int nthreads = thread_map__nr(evsel->threads);
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 36ed0997e65b..49c51fb3d05c 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -234,6 +234,8 @@ void perf_evsel__set_sample_id(struct perf_evsel *evsel,
int perf_evsel__set_filter(struct perf_evsel *evsel, const char *filter);
int perf_evsel__append_tp_filter(struct perf_evsel *evsel, const char *filter);
+int perf_evsel__append_addr_filter(struct perf_evsel *evsel,
+ const char *filter);
int perf_evsel__apply_filter(struct perf_evsel *evsel, int ncpus, int nthreads,
const char *filter);
int perf_evsel__enable(struct perf_evsel *evsel);
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 751b48fc641c..c23f2d5fc134 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -1755,20 +1755,49 @@ foreach_evsel_in_last_glob(struct perf_evlist *evlist,
static int set_filter(struct perf_evsel *evsel, const void *arg)
{
const char *str = arg;
+ bool found = false;
+ int nr_addr_filters = 0;
+ struct perf_pmu *pmu = NULL;
- if (evsel == NULL || evsel->attr.type != PERF_TYPE_TRACEPOINT) {
- fprintf(stderr,
- "--filter option should follow a -e tracepoint option\n");
- return -1;
+ if (evsel == NULL)
+ goto err;
+
+ if (evsel->attr.type == PERF_TYPE_TRACEPOINT) {
+ if (perf_evsel__append_tp_filter(evsel, str) < 0) {
+ fprintf(stderr,
+ "not enough memory to hold filter string\n");
+ return -1;
+ }
+
+ return 0;
}
- if (perf_evsel__append_tp_filter(evsel, str) < 0) {
+ while ((pmu = perf_pmu__scan(pmu)) != NULL)
+ if (pmu->type == evsel->attr.type) {
+ found = true;
+ break;
+ }
+
+ if (found)
+ perf_pmu__scan_file(pmu, "nr_addr_filters",
+ "%d", &nr_addr_filters);
+
+ if (!nr_addr_filters)
+ goto err;
+
+ if (perf_evsel__append_addr_filter(evsel, str) < 0) {
fprintf(stderr,
"not enough memory to hold filter string\n");
return -1;
}
return 0;
+
+err:
+ fprintf(stderr,
+ "--filter option should follow a -e tracepoint or HW tracer option\n");
+
+ return -1;
}
int parse_filter(const struct option *opt, const char *str,
--
2.7.4
^ permalink raw reply related
* [PATCH V7 2/3] perf tools: new tracepoint specific function
From: Mathieu Poirier @ 2016-09-16 14:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1474037045-31730-1-git-send-email-mathieu.poirier@linaro.org>
Making function perf_evsel__append_filter() static and
introducing a new tracepoint specific function to append
filters. That way we eliminate redundant code and avoid
formatting mistake.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
---
tools/perf/builtin-trace.c | 7 +++----
tools/perf/util/evsel.c | 9 +++++++--
tools/perf/util/evsel.h | 3 +--
tools/perf/util/parse-events.c | 4 ++--
4 files changed, 13 insertions(+), 10 deletions(-)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index 4c2704332c14..34effab09f39 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2148,11 +2148,10 @@ static int trace__set_ev_qualifier_filter(struct trace *trace)
if (filter == NULL)
goto out_enomem;
- if (!perf_evsel__append_filter(trace->syscalls.events.sys_enter,
- "(%s) && (%s)", filter)) {
+ if (!perf_evsel__append_tp_filter(trace->syscalls.events.sys_enter,
+ filter)) {
sys_exit = trace->syscalls.events.sys_exit;
- err = perf_evsel__append_filter(sys_exit,
- "(%s) && (%s)", filter);
+ err = perf_evsel__append_tp_filter(sys_exit, filter);
}
free(filter);
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index b93369745e08..a99e82d97df2 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1045,8 +1045,8 @@ int perf_evsel__set_filter(struct perf_evsel *evsel, const char *filter)
return -1;
}
-int perf_evsel__append_filter(struct perf_evsel *evsel,
- const char *fmt, const char *filter)
+static int perf_evsel__append_filter(struct perf_evsel *evsel,
+ const char *fmt, const char *filter)
{
char *new_filter;
@@ -1062,6 +1062,11 @@ int perf_evsel__append_filter(struct perf_evsel *evsel,
return -1;
}
+int perf_evsel__append_tp_filter(struct perf_evsel *evsel, const char *filter)
+{
+ return perf_evsel__append_filter(evsel, "(%s) && (%s)", filter);
+}
+
int perf_evsel__enable(struct perf_evsel *evsel)
{
int nthreads = thread_map__nr(evsel->threads);
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 7ab59f15892f..36ed0997e65b 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -233,8 +233,7 @@ void perf_evsel__set_sample_id(struct perf_evsel *evsel,
bool use_sample_identifier);
int perf_evsel__set_filter(struct perf_evsel *evsel, const char *filter);
-int perf_evsel__append_filter(struct perf_evsel *evsel,
- const char *fmt, const char *filter);
+int perf_evsel__append_tp_filter(struct perf_evsel *evsel, const char *filter);
int perf_evsel__apply_filter(struct perf_evsel *evsel, int ncpus, int nthreads,
const char *filter);
int perf_evsel__enable(struct perf_evsel *evsel);
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 9692300585f6..751b48fc641c 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -1762,7 +1762,7 @@ static int set_filter(struct perf_evsel *evsel, const void *arg)
return -1;
}
- if (perf_evsel__append_filter(evsel, "(%s) && (%s)", str) < 0) {
+ if (perf_evsel__append_tp_filter(evsel, str) < 0) {
fprintf(stderr,
"not enough memory to hold filter string\n");
return -1;
@@ -1793,7 +1793,7 @@ static int add_exclude_perf_filter(struct perf_evsel *evsel,
snprintf(new_filter, sizeof(new_filter), "common_pid != %d", getpid());
- if (perf_evsel__append_filter(evsel, "(%s) && (%s)", new_filter) < 0) {
+ if (perf_evsel__append_tp_filter(evsel, new_filter) < 0) {
fprintf(stderr,
"not enough memory to hold filter string\n");
return -1;
--
2.7.4
^ permalink raw reply related
* [PATCH V7 1/3] perf tools: making perf_evsel__append_filter() generic
From: Mathieu Poirier @ 2016-09-16 14:44 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <1474037045-31730-1-git-send-email-mathieu.poirier@linaro.org>
By making function perf_evsel__append_filter() take a format rather
than an operator it is possible to reuse the code for other purposes
(ex. Intel PT and CoreSight) than tracepoints.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
---
tools/perf/builtin-trace.c | 9 +++++++--
tools/perf/util/evsel.c | 4 ++--
tools/perf/util/evsel.h | 2 +-
tools/perf/util/parse-events.c | 4 ++--
4 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/tools/perf/builtin-trace.c b/tools/perf/builtin-trace.c
index b8c6766301db..4c2704332c14 100644
--- a/tools/perf/builtin-trace.c
+++ b/tools/perf/builtin-trace.c
@@ -2140,6 +2140,7 @@ out_delete_sys_enter:
static int trace__set_ev_qualifier_filter(struct trace *trace)
{
int err = -1;
+ struct perf_evsel *sys_exit;
char *filter = asprintf_expr_inout_ints("id", !trace->not_ev_qualifier,
trace->ev_qualifier_ids.nr,
trace->ev_qualifier_ids.entries);
@@ -2147,8 +2148,12 @@ static int trace__set_ev_qualifier_filter(struct trace *trace)
if (filter == NULL)
goto out_enomem;
- if (!perf_evsel__append_filter(trace->syscalls.events.sys_enter, "&&", filter))
- err = perf_evsel__append_filter(trace->syscalls.events.sys_exit, "&&", filter);
+ if (!perf_evsel__append_filter(trace->syscalls.events.sys_enter,
+ "(%s) && (%s)", filter)) {
+ sys_exit = trace->syscalls.events.sys_exit;
+ err = perf_evsel__append_filter(sys_exit,
+ "(%s) && (%s)", filter);
+ }
free(filter);
out:
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 21fd573106ed..b93369745e08 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1046,14 +1046,14 @@ int perf_evsel__set_filter(struct perf_evsel *evsel, const char *filter)
}
int perf_evsel__append_filter(struct perf_evsel *evsel,
- const char *op, const char *filter)
+ const char *fmt, const char *filter)
{
char *new_filter;
if (evsel->filter == NULL)
return perf_evsel__set_filter(evsel, filter);
- if (asprintf(&new_filter,"(%s) %s (%s)", evsel->filter, op, filter) > 0) {
+ if (asprintf(&new_filter, fmt, evsel->filter, filter) > 0) {
free(evsel->filter);
evsel->filter = new_filter;
return 0;
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 4d44129e050b..7ab59f15892f 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -234,7 +234,7 @@ void perf_evsel__set_sample_id(struct perf_evsel *evsel,
int perf_evsel__set_filter(struct perf_evsel *evsel, const char *filter);
int perf_evsel__append_filter(struct perf_evsel *evsel,
- const char *op, const char *filter);
+ const char *fmt, const char *filter);
int perf_evsel__apply_filter(struct perf_evsel *evsel, int ncpus, int nthreads,
const char *filter);
int perf_evsel__enable(struct perf_evsel *evsel);
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index 6c913c3914fb..9692300585f6 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -1762,7 +1762,7 @@ static int set_filter(struct perf_evsel *evsel, const void *arg)
return -1;
}
- if (perf_evsel__append_filter(evsel, "&&", str) < 0) {
+ if (perf_evsel__append_filter(evsel, "(%s) && (%s)", str) < 0) {
fprintf(stderr,
"not enough memory to hold filter string\n");
return -1;
@@ -1793,7 +1793,7 @@ static int add_exclude_perf_filter(struct perf_evsel *evsel,
snprintf(new_filter, sizeof(new_filter), "common_pid != %d", getpid());
- if (perf_evsel__append_filter(evsel, "&&", new_filter) < 0) {
+ if (perf_evsel__append_filter(evsel, "(%s) && (%s)", new_filter) < 0) {
fprintf(stderr,
"not enough memory to hold filter string\n");
return -1;
--
2.7.4
^ permalink raw reply related
* [PATCH V7 0/3] Adding support for address filters
From: Mathieu Poirier @ 2016-09-16 14:44 UTC (permalink / raw)
To: linux-arm-kernel
This patch set makes it possible to use the current filter
framework with address filters. That way address filters for
HW tracers such as CoreSight and Intel PT can be communicated
to the kernel drivers.
In this revision precursor work is done to make function
perf_evsel__append_filter() generic, along with changes to
current customers. From there the work on address filters is
introduced.
Thanks,
Mathieu
---
Changes for V7:
- s/intelPT/Intel PT
- Added Adrian's ack.
Changes for V6:
- Split work in 3 (small) patches.
- Adding tracepoint and address filter append() functions
Changes for V5:
- Modified perf_evsel__append_filter() to take a string format
rather than an operation.
Changes for V4:
- Added support for address filters over more than one
nibble.
- Removed Jiri's ack, this version is too different from
what was reviewed.
Changes for V3:
- Added Jiri's ack.
- Rebased to v4.8-rc5.
Changes for V2:
- Rebased to v4.8-rc4.
- Revisited error path.
Mathieu Poirier (3):
perf tools: making perf_evsel__append_filter() generic
perf tools: new tracepoint specific function
perf tools: adding support for address filters
tools/perf/builtin-trace.c | 8 ++++++--
tools/perf/util/evsel.c | 16 +++++++++++++---
tools/perf/util/evsel.h | 5 +++--
tools/perf/util/parse-events.c | 41 +++++++++++++++++++++++++++++++++++------
4 files changed, 57 insertions(+), 13 deletions(-)
--
2.7.4
^ permalink raw reply
* [PATCH v5 3/3] clk: imx6: Fix procedure to switch the parent of LDB_DI_CLK
From: Philipp Zabel @ 2016-09-16 14:42 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <CAOMZO5DPTSGafyYavoOcpKgo7Y=bh9Kd7KPHQ2QKLAxqzbQyMA@mail.gmail.com>
Am Freitag, den 16.09.2016, 11:33 -0300 schrieb Fabio Estevam:
> On Thu, Sep 15, 2016 at 10:36 PM, Shawn Guo <shawnguo@kernel.org> wrote:
>
> >> Shawn,
> >>
> >> Are you happy with it?
> >
> > Acked-by: Shawn Guo <shawnguo@kernel.org>
> >
> > Please send it to clk maintainers for applying.
>
> Thanks. Just sent it to the clk folks.
Thanks!
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox