* Re: [PATCH] x86/kvm: Move kvm_fastop_exception to .fixup section
From: Paolo Bonzini @ 2017-10-05 6:54 UTC (permalink / raw)
To: Josh Poimboeuf, Radim Krčmář
Cc: x86, linux-kernel, kvm, Guenter Roeck
In-Reply-To: <e974660207b99b822309c09365bf953080131791.1507131424.git.jpoimboe@redhat.com>
On 04/10/2017 17:39, Josh Poimboeuf wrote:
> When compiling the kernel with the '-frecord-gcc-switches' flag, objtool
> complains:
>
> arch/x86/kvm/emulate.o: warning: objtool: .GCC.command.line+0x0: special: can't find new instruction
>
> And also the kernel fails to link.
>
> The problem is that the 'kvm_fastop_exception' code gets placed into the
> throwaway '.GCC.command.line' section instead of '.text'.
>
> Exception fixup code is conventionally placed in the '.fixup' section,
> so put it there where it belongs.
>
> Reported-and-tested-by: Guenter Roeck <linux@roeck-us.net>
> Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
> ---
> arch/x86/kvm/emulate.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> index a36254cbf776..d90cdc77e077 100644
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -425,8 +425,10 @@ static int fastop(struct x86_emulate_ctxt *ctxt, void (*fop)(struct fastop *));
> #op " %al \n\t" \
> FOP_RET
>
> -asm(".global kvm_fastop_exception \n"
> - "kvm_fastop_exception: xor %esi, %esi; ret");
> +asm(".pushsection .fixup, \"ax\"\n"
> + ".global kvm_fastop_exception \n"
> + "kvm_fastop_exception: xor %esi, %esi; ret\n"
> + ".popsection");
>
> FOP_START(setcc)
> FOP_SETCC(seto)
>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
^ permalink raw reply
* Re: [PATCH 10/13] timer: Remove expires and data arguments from DEFINE_TIMER
From: Kalle Valo @ 2017-10-05 6:54 UTC (permalink / raw)
To: Kees Cook
Cc: Thomas Gleixner, Andrew Morton, Arnd Bergmann,
Benjamin Herrenschmidt, Chris Metcalf, Geert Uytterhoeven,
Greg Kroah-Hartman, Guenter Roeck, Harish Patil, Heiko Carstens,
James E.J. Bottomley, John Stultz, Julian Wiedmann, Lai Jiangshan,
Len Brown, Manish Chopra, Mark Gross, Martin K. Petersen,
Martin Schwidefsky <schwidefs
In-Reply-To: <1507159627-127660-11-git-send-email-keescook@chromium.org>
Kees Cook <keescook@chromium.org> writes:
> Drop the arguments from the macro and adjust all callers with the
> following script:
>
> perl -pi -e 's/DEFINE_TIMER\((.*), 0, 0\);/DEFINE_TIMER($1);/g;' \
> $(git grep DEFINE_TIMER | cut -d: -f1 | sort -u | grep -v timer.h)
>
> Signed-off-by: Kees Cook <keescook@chromium.org>
> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> # for m68k parts
[...]
> drivers/net/wireless/atmel/at76c50x-usb.c | 2 +-
For wireless:
Acked-by: Kalle Valo <kvalo@codeaurora.org>
--
Kalle Valo
^ permalink raw reply
* Re: [PATCH v2 1/2] drm/i915/edp: Get the Panel Power Off timestamp after panel is off
From: Jani Nikula @ 2017-10-05 6:54 UTC (permalink / raw)
To: Manasi Navare, intel-gfx; +Cc: Daniel Vetter
In-Reply-To: <1507135706-17147-1-git-send-email-manasi.d.navare@intel.com>
On Wed, 04 Oct 2017, Manasi Navare <manasi.d.navare@intel.com> wrote:
> Kernel stores the time in jiffies at which the eDP panel is turned
> off. This should be obtained after the panel is off (after the
> wait_panel_off). When we next attempt to turn the panel on, we
> use the difference between the timestamp at which we want to turn the
> panel on and timestamp at which panel was turned off to ensure that this
> is equal to panel power cycle delay and if not we wait for the remaining
> time. Not waiting for the panel power cycle delay can cause the panel to not
> turn on giving rise to AUX timeouts for the attempted AUX transactions.
>
> v2:
> * Separate lines for bugzilla (Jani Nikula)
> * Suggested by tag (Daniel Vetter)
>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Cc: Jani Nikula <jani.nikula@linux.intel.com>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101518
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101144
> Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> Reviewed-by: Jani Nikula <jani.nikula@linux.intel.com>
Pushed both to dinq, with cc: stable on the first. Thanks for the
patches and the debugging efforts in particular!
---
Please do try to make it a habit to run checkpatch on your patches
before sending. We don't care about all of the more subjective warnings,
but then at least you make the conscious decision to ignore them.
I fixed these while applying:
-:13: WARNING: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#13:
time. Not waiting for the panel power cycle delay can cause the panel to not
-:26: WARNING: Use a single space after Reviewed-by:
#26:
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
I use these to run checkpatch on the commits in my local tree before
sending:
alias checkpatch='checkpatch.pl -q --emacs --strict'
checkbranch()
{
local commit
local range
if [ -z "$1" ]; then
range="HEAD^..HEAD"
elif [ -n "`echo $1 | grep '\.\.'`" ]; then
range="$1"
else
range="$1..HEAD"
fi
for commit in `git rev-list --reverse $range`; do
git --no-pager log --oneline -1 $commit
git format-patch --stdout -1 $commit | checkpatch -
done
}
and use like:
$ checkbranch $tip
where tip=drm-tip/drm-tip
I also have similar stuff to run sparse on every single series I send
out. Overall it's just so much more efficient to catch the trivial stuff
early rather than late. I also consider it a courtesy to my fellow
developers.
BR,
Jani.
> ---
> drivers/gpu/drm/i915/intel_dp.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
> index 90e756c..0fd41cd 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -2308,8 +2308,8 @@ static void edp_panel_off(struct intel_dp *intel_dp)
> I915_WRITE(pp_ctrl_reg, pp);
> POSTING_READ(pp_ctrl_reg);
>
> - intel_dp->panel_power_off_time = ktime_get_boottime();
> wait_panel_off(intel_dp);
> + intel_dp->panel_power_off_time = ktime_get_boottime();
>
> /* We got a reference when we enabled the VDD. */
> intel_display_power_put(dev_priv, intel_dp->aux_power_domain);
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* Re: [Qemu-devel] [PATCH] s390x/sclp: mark sclp-cpu-hotplug as non-usercreatable
From: Christian Borntraeger @ 2017-10-05 6:53 UTC (permalink / raw)
To: Cornelia Huck, qemu-devel; +Cc: agraf, rth, thuth
In-Reply-To: <20171004154647.7572-1-cohuck@redhat.com>
On 10/04/2017 05:46 PM, Cornelia Huck wrote:
> A TYPE_SCLP_CPU_HOTPLUG device for handling cpu hotplug events
> is already created by the sclp event facility. Adding a second
> TYPE_SCLP_CPU_HOTPLUG device via -device sclp-cpu-hotplug creates
> an ambiguity in raise_irq_cpu_hotplug(), leading to a crash once
> a cpu is hotplugged.
>
> To fix this, disallow creating a sclp-cpu-hotplug device manually.
>
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Most of these missing user_create things stem from a time of qdev.no_user
which was then later deprecated and replaced with cannot_instantiate_with_device_add_yet
It was supposed to be a temporary measure but now we all know that there ARE devices
which are not user_creatable.
So its good to get this all fixed.
> ---
> hw/s390x/sclpcpu.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/hw/s390x/sclpcpu.c b/hw/s390x/sclpcpu.c
> index 023d059a46..3ee890b392 100644
> --- a/hw/s390x/sclpcpu.c
> +++ b/hw/s390x/sclpcpu.c
> @@ -82,6 +82,12 @@ static void cpu_class_init(ObjectClass *oc, void *data)
> k->get_receive_mask = receive_mask;
> k->read_event_data = read_event_data;
> set_bit(DEVICE_CATEGORY_MISC, dc->categories);
> + /*
> + * Reason: raise_irq_cpu_hotplug() depends on an unique
> + * TYPE_SCLP_CPU_HOTPLUG device, which is already created
> + * by the sclp event facility
> + */
> + dc->user_creatable = false;
> }
>
> static const TypeInfo sclp_cpu_info = {
>
^ permalink raw reply
* Re: [PATCH 00/12] of: overlay: clean up device tree overlay code
From: Tomi Valkeinen @ 2017-10-05 6:53 UTC (permalink / raw)
To: Rob Herring, Frank Rowand, Jyri Sarha
Cc: Pantelis Antoniou, David Airlie, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Mark Rutland, dri-devel
In-Reply-To: <CAL_JsqJFPHOxrOYNcJCmNvdTA+1RqZxNSZOq6byzDVygUwV0Ow@mail.gmail.com>
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
On 04/10/17 17:56, Rob Herring wrote:
> On Mon, Oct 2, 2017 at 10:53 PM, <frowand.list@gmail.com> wrote:
>> From: Frank Rowand <frank.rowand@sony.com>
>>
>> I have found the device tree overlay code to be difficult to read and
>> maintain. This patch series attempts to improve that situation.
>>
>> The cleanup includes some changes visible to users of overlays. The
>> only in kernel user of overlays is fixed up for those changes. The
>> in kernel user is:
>>
>> drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c
>
> At what point can we remove this? I'm assuming at some point users
> will need to update their dtb's for other reasons and this becomes
> obsolete.
To be honest, I have no idea, or how to find that out.
Do we need to get rid of it? Afaik, we haven't do much (or any?)
maintenance on tilcdc_slave_compat.c since it was written, so from our
perspective it's been a minimal burden. Is it creating burden for others?
Is the approach done with tilcdc_slave_compat.c something that's not
recommended? I'm sure similar situations happen with other drivers too,
and I think it's a good idea to have a recommended way of keeping
compatibility.
Tomi
^ permalink raw reply
* Re: [PATCH 00/12] of: overlay: clean up device tree overlay code
From: Tomi Valkeinen @ 2017-10-05 6:53 UTC (permalink / raw)
To: Rob Herring, Frank Rowand, Jyri Sarha
Cc: Mark Rutland, devicetree@vger.kernel.org, Pantelis Antoniou,
linux-kernel@vger.kernel.org, dri-devel
In-Reply-To: <CAL_JsqJFPHOxrOYNcJCmNvdTA+1RqZxNSZOq6byzDVygUwV0Ow@mail.gmail.com>
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
On 04/10/17 17:56, Rob Herring wrote:
> On Mon, Oct 2, 2017 at 10:53 PM, <frowand.list@gmail.com> wrote:
>> From: Frank Rowand <frank.rowand@sony.com>
>>
>> I have found the device tree overlay code to be difficult to read and
>> maintain. This patch series attempts to improve that situation.
>>
>> The cleanup includes some changes visible to users of overlays. The
>> only in kernel user of overlays is fixed up for those changes. The
>> in kernel user is:
>>
>> drivers/gpu/drm/tilcdc/tilcdc_slave_compat.c
>
> At what point can we remove this? I'm assuming at some point users
> will need to update their dtb's for other reasons and this becomes
> obsolete.
To be honest, I have no idea, or how to find that out.
Do we need to get rid of it? Afaik, we haven't do much (or any?)
maintenance on tilcdc_slave_compat.c since it was written, so from our
perspective it's been a minimal burden. Is it creating burden for others?
Is the approach done with tilcdc_slave_compat.c something that's not
recommended? I'm sure similar situations happen with other drivers too,
and I think it's a good idea to have a recommended way of keeping
compatibility.
Tomi
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply
* (unknown),
From: helga.brickl @ 2017-10-05 6:53 UTC (permalink / raw)
To: netdev
[-- Attachment #1: INFO_89244804971359_netdev.zip --]
[-- Type: application/zip, Size: 44235 bytes --]
^ permalink raw reply
* Re: [PATCH v4 5/5] ARM: ITS: Expose ITS in the MADT table
From: Manish Jaggi @ 2017-10-05 6:52 UTC (permalink / raw)
To: Julien Grall, xen-devel; +Cc: Andre.Przywara, sstabellini, Manish Jaggi
In-Reply-To: <16c57898-e378-faec-19c3-fd3b6902d791@arm.com>
Hi Andre,
On 10/3/2017 8:03 PM, Julien Grall wrote:
> Hi Manish,
>
> On 21/09/17 14:17, mjaggi@caviumnetworks.com wrote:
>> From: Manish Jaggi <mjaggi@cavium.com>
>>
>> Add gicv3_its_make_hwdom_madt to update hwdom MADT ITS information.
>>
>> Signed-off-by: Manish Jaggi <mjaggi@cavium.com>
>> ---
>> xen/arch/arm/gic-v3-its.c | 19 +++++++++++++++++++
>> xen/arch/arm/gic-v3.c | 1 +
>> xen/include/asm-arm/gic_v3_its.h | 8 ++++++++
>> 3 files changed, 28 insertions(+)
>>
>> diff --git a/xen/arch/arm/gic-v3-its.c b/xen/arch/arm/gic-v3-its.c
>> index 8697e5b..e3e7e92 100644
>> --- a/xen/arch/arm/gic-v3-its.c
>> +++ b/xen/arch/arm/gic-v3-its.c
>> @@ -1062,6 +1062,25 @@ void gicv3_its_acpi_init(void)
>> acpi_table_parse_madt(ACPI_MADT_TYPE_GENERIC_TRANSLATOR,
>> gicv3_its_acpi_probe, 0);
>> }
>> +
>> +unsigned long gicv3_its_make_hwdom_madt(const struct domain *d, void
>> *base_ptr)
>> +{
>> + unsigned long i = 0;
>> + void *fw_its;
>> + struct acpi_madt_generic_translator *hwdom_its;
>> +
>> + hwdom_its = base_ptr;
>> +
>> + for ( i = 0; i < vgic_v3_its_count(d); i++ )
>> + {
>> + fw_its =
>> acpi_table_get_entry_madt(ACPI_MADT_TYPE_GENERIC_TRANSLATOR,
>> + i);
>> + memcpy(hwdom_its, fw_its, sizeof(struct
>> acpi_madt_generic_translator));
>> + hwdom_its++;
>> + }
>> +
>> + return sizeof(struct acpi_madt_generic_translator) *
>> vgic_v3_its_count(d);
>> +}
>> #endif
>> /*
>> diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
>> index 6e8d580..d29eea6 100644
>> --- a/xen/arch/arm/gic-v3.c
>> +++ b/xen/arch/arm/gic-v3.c
>> @@ -1403,6 +1403,7 @@ static int gicv3_make_hwdom_madt(const struct
>> domain *d, u32 offset)
>> table_len += size;
>> }
>> + table_len += gicv3_its_make_hwdom_madt(d, base_ptr + table_len);
>
> Newline here please.
>
> I will leave Andre to comment on this patch as he suggested the rework.
Could you please provide comments on this patch so that I can send an
updated v5.
>
> Cheers,
>
>> return table_len;
>> }
>> diff --git a/xen/include/asm-arm/gic_v3_its.h
>> b/xen/include/asm-arm/gic_v3_its.h
>> index 31fca66..fc37776 100644
>> --- a/xen/include/asm-arm/gic_v3_its.h
>> +++ b/xen/include/asm-arm/gic_v3_its.h
>> @@ -138,6 +138,8 @@ void gicv3_its_dt_init(const struct
>> dt_device_node *node);
>> #ifdef CONFIG_ACPI
>> void gicv3_its_acpi_init(void);
>> +unsigned long gicv3_its_make_hwdom_madt(const struct domain *d,
>> + void *base_ptr);
>> #endif
>> /* Deny iomem access for its */
>> @@ -208,6 +210,12 @@ static inline void gicv3_its_dt_init(const
>> struct dt_device_node *node)
>> static inline void gicv3_its_acpi_init(void)
>> {
>> }
>> +
>> +static inline unsigned long gicv3_its_make_hwdom_madt(const struct
>> domain *d,
>> + void *base_ptr)
>> +{
>> + return 0;
>> +}
>> #endif
>> static inline int gicv3_its_deny_access(const struct domain *d)
>>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply
* [BUG] get_maintainers: Inconsistent behavior on multiple runs
From: Viresh Kumar @ 2017-10-05 6:51 UTC (permalink / raw)
To: Joe Perches; +Cc: Manu Gautam, Linux Kernel Mailing List, Vincent Guittot
[-- Attachment #1: Type: text/plain, Size: 3177 bytes --]
Hi Joe,
Recently I was Cc'd for some of the patches from Manu, as
get_maintainers incorrectly mentioned me.
Apart from the fact that I never contributed to the mentioned
file (drivers/phy/qualcomm/phy-qcom-qmp.c), the behavior (output)
of get_maintainers changes on multiple runs. I tried following tests on
pm/linux-next branch today (should be same on any of the latest -rc
releases). There was no difference in the environment between the
two runs.
$ scripts/get_maintainer.pl drivers/phy/qualcomm/phy-qcom-qmp.c
Kishon Vijay Abraham I <kishon@ti.com> (supporter:GENERIC PHY
FRAMEWORK,commit_signer:7/7=100%)
Vivek Gautam <vivek.gautam@codeaurora.org>
(commit_signer:5/7=71%,authored:3/7=43%)
Varadarajan Narayanan <varada@codeaurora.org>
(commit_signer:2/7=29%,authored:2/7=29%)
Fengguang Wu <fengguang.wu@intel.com> (commit_signer:1/7=14%,authored:1/7=14%)
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> (commit_signer:1/7=14%)
Wei Yongjun <weiyongjun1@huawei.com> (authored:1/7=14%)
linux-kernel@vger.kernel.org (open list:GENERIC PHY FRAMEWORK)
$ scripts/get_maintainer.pl drivers/phy/qualcomm/phy-qcom-qmp.c
Kishon Vijay Abraham I <kishon@ti.com> (supporter:GENERIC PHY
FRAMEWORK,commit_signer:7/7=100%)
Vivek Gautam <vivek.gautam@codeaurora.org>
(commit_signer:5/7=71%,authored:3/7=43%)
Varadarajan Narayanan <varada@codeaurora.org>
(commit_signer:2/7=29%,authored:2/7=29%)
Krzysztof Kozlowski <krzk@kernel.org> (commit_signer:1/7=14%)
Viresh Kumar <viresh.kumar@linaro.org> (commit_signer:1/7=14%)
Wei Yongjun <weiyongjun1@huawei.com> (authored:1/7=14%)
Fengguang Wu <fengguang.wu@intel.com> (authored:1/7=14%)
linux-kernel@vger.kernel.org (open list:GENERIC PHY FRAMEWORK)
The second one incorrectly adds me to the list. Also the order of entries
is different, not sure if it should be.
The same inconsistency is seen while running on the real patch (attached).
$ scripts/get_maintainer.pl ~/Downloads/original_msg.txt
Kishon Vijay Abraham I <kishon@ti.com> (supporter:GENERIC PHY
FRAMEWORK,commit_signer:7/7=100%)
Vivek Gautam <vivek.gautam@codeaurora.org>
(commit_signer:5/7=71%,authored:3/7=43%)
Varadarajan Narayanan <varada@codeaurora.org>
(commit_signer:2/7=29%,authored:2/7=29%)
Heiko Stuebner <heiko@sntech.de> (commit_signer:1/7=14%)
Jaehoon Chung <jh80.chung@samsung.com> (commit_signer:1/7=14%)
Wei Yongjun <weiyongjun1@huawei.com> (authored:1/7=14%)
Fengguang Wu <fengguang.wu@intel.com> (authored:1/7=14%)
linux-kernel@vger.kernel.org (open list:GENERIC PHY FRAMEWORK)
$ scripts/get_maintainer.pl ~/Downloads/original_msg.txt
Kishon Vijay Abraham I <kishon@ti.com> (supporter:GENERIC PHY
FRAMEWORK,commit_signer:7/7=100%)
Vivek Gautam <vivek.gautam@codeaurora.org>
(commit_signer:5/7=71%,authored:3/7=43%)
Varadarajan Narayanan <varada@codeaurora.org>
(commit_signer:2/7=29%,authored:2/7=29%)
Viresh Kumar <viresh.kumar@linaro.org> (commit_signer:1/7=14%)
Fengguang Wu <fengguang.wu@intel.com> (commit_signer:1/7=14%,authored:1/7=14%)
Wei Yongjun <weiyongjun1@huawei.com> (authored:1/7=14%)
linux-kernel@vger.kernel.org (open list:GENERIC PHY FRAMEWORK)
I have no clue on why this happened and so including you in the chain :)
--
viresh
[-- Attachment #2: original_msg.txt --]
[-- Type: text/plain, Size: 9818 bytes --]
Delivered-To: viresh.linux@gmail.com
Received: by 10.2.180.65 with SMTP id w1csp4538366jaj;
Wed, 27 Sep 2017 02:11:06 -0700 (PDT)
X-Google-Smtp-Source: AOwi7QBZHaq0V0J8uYgB6DJBV4OJ/tEj+pmXv8bkLSVUA7XIcqkCZM9kqacUKqBEIg1BV/1tMLzl
X-Received: by 10.99.112.94 with SMTP id a30mr743393pgn.304.1506503465989;
Wed, 27 Sep 2017 02:11:05 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1506503465; cv=none;
d=google.com; s=arc-20160816;
b=NTa1mneBllPtaQJbVq0uet/5ZYb5Oz45j+a+dDl90NOSX1X79hWkv89/ncoXZ2AZtC
lMbUOPmxImLC6+CLLR0b8FfihuWFDqZjRRv55oRzib7xZDgyACBw1jOYRnc8bdSRHcrK
tM5riVWhTxHmkPkEU80miKHqY7DZj0olBa9iur6rJoW46bzsxZaZiWKxFdNHLYaJziOb
6TVzUCKTVLYjvimSGpTMhY5YZbjTuAkx32C4YJVINDOZ5SbI3MnOMuVqHA7sSgg/qPCf
1oxoZsSZ8ZvKinLiSQzLsKty+2fhvuYu0lcav+jvSdAg3rO6ntMiNQ62SfpvH5CMAvSN
c0jw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
h=list-id:precedence:sender:references:in-reply-to:message-id:date
:subject:cc:to:from:dmarc-filter:dkim-signature:dkim-signature
:arc-authentication-results;
bh=nHZTbxWXg77oeyRzx8iNby04MJyxMIzRrg6dKzeoq0Q=;
b=eyKuJmHJkeU5rO0IRFJ0HFtYPOmLMHbGgIxSHsfPd+xU7XJsWvHc/+ijmK04ldyTff
P0sBsot2vbwpreWW348nxcFjfKVit9AnRU21sX54LwsZVssBJfN/97LFjuIkXKPaYY5P
0aHB0g4qp8cDrjxG8Mk9sQtAoMoAetbfTbqk4PB6fhlsPLDT9vzTNTLS5qL2ZJtNJJ4n
tNJqziKUH2GAXWNoX02/LFJDiTgNteID0mCHvw4jBpd6SCrWL/oVxMMau8zm8vmT0qze
mkIFpV6iyYN9ouuYg1FFWWjkuCHPrb0srt3lbyUncbk5z1AmLaXd6ApzVuXiPBSIj2lL
xJKg==
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@codeaurora.org header.s=default header.b=VxUZlWdu;
dkim=pass header.i=@codeaurora.org header.s=default header.b=XwfEIRXT;
spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org
Return-Path: <linux-kernel-owner@vger.kernel.org>
Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67])
by mx.google.com with ESMTP id y7si6995567pln.60.2017.09.27.02.10.53;
Wed, 27 Sep 2017 02:11:05 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67;
Authentication-Results: mx.google.com;
dkim=pass header.i=@codeaurora.org header.s=default header.b=VxUZlWdu;
dkim=pass header.i=@codeaurora.org header.s=default header.b=XwfEIRXT;
spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1752601AbdI0JAB (ORCPT <rfc822;thornbird.kernel@gmail.com>
+ 99 others); Wed, 27 Sep 2017 05:00:01 -0400
Received: from smtp.codeaurora.org ([198.145.29.96]:49970 "EHLO
smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S1752339AbdI0I74 (ORCPT
<rfc822;linux-kernel@vger.kernel.org>);
Wed, 27 Sep 2017 04:59:56 -0400
Received: by smtp.codeaurora.org (Postfix, from userid 1000)
id 0AE3560B7C; Wed, 27 Sep 2017 08:59:54 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org;
s=default; t=1506502796;
bh=B7w2C0LJ42VFqs35ImnVN3C/Y7sW+Iq2EvkrT2orw7w=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=VxUZlWdu5WKitSofZt2Nmi3hPnnBsUeWisxrMMu8KJdpqUy+bGXpP0NN7lJaOoBMh
/0TXSumyMktCryFxLR2ScsY6034Eqf8sG9zXJpE3nM4IRFkm1FKhTq3gdmvtRiS23j
FQwFXHrlEuSmWCdjdip1B/pj/yhhuZ51uKdzT/oI=
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on
pdx-caf-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00,
DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0
Received: from mgautam-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19])
(using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits))
(No client certificate requested)
(Authenticated sender: mgautam@smtp.codeaurora.org)
by smtp.codeaurora.org (Postfix) with ESMTPSA id 1E0336071D;
Wed, 27 Sep 2017 08:59:50 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org;
s=default; t=1506502794;
bh=B7w2C0LJ42VFqs35ImnVN3C/Y7sW+Iq2EvkrT2orw7w=;
h=From:To:Cc:Subject:Date:In-Reply-To:References:From;
b=XwfEIRXTiizYBhJL7sCP6QgMzVw7Px5Tnt2DPRhjwhgIvaPm4c1Mp3b1g+Jcuk2kb
fYZAWFJq4oxALlAQ8HSE6mI+Bt1D6aVg4Zd8ayn6hAFuWNkWy9FN4HfGeki01lskgi
5GlY0j3UVOoNVKjhloYBzNRGZbuX4ntR2vnv1Xss=
DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1E0336071D
Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org
Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=mgautam@codeaurora.org
From: Manu Gautam <mgautam@codeaurora.org>
To: Kishon Vijay Abraham I <kishon@ti.com>
Cc: Felipe Balbi <balbi@kernel.org>, linux-arm-msm@vger.kernel.org,
linux-usb@vger.kernel.org,
Vivek Gautam <vivek.gautam@codeaurora.org>,
Manu Gautam <mgautam@codeaurora.org>,
Varadarajan Narayanan <varada@codeaurora.org>,
Fengguang Wu <fengguang.wu@intel.com>,
Wei Yongjun <weiyongjun1@huawei.com>,
linux-kernel@vger.kernel.org (open list:GENERIC PHY FRAMEWORK)
Subject: [PATCH v2 02/17] phy: qcom-qmp: Adapt to clk_bulk_* APIs
Date: Wed, 27 Sep 2017 14:28:58 +0530
Message-Id: <1506502753-27408-3-git-send-email-mgautam@codeaurora.org>
X-Mailer: git-send-email 1.9.1
In-Reply-To: <1506502753-27408-1-git-send-email-mgautam@codeaurora.org>
References: <1506502753-27408-1-git-send-email-mgautam@codeaurora.org>
Sender: linux-kernel-owner@vger.kernel.org
Precedence: bulk
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org
From: Vivek Gautam <vivek.gautam@codeaurora.org>
Move from using array of clocks to clk_bulk_* APIs that
are available now.
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
---
drivers/phy/qualcomm/phy-qcom-qmp.c | 50 ++++++++++++-------------------------
1 file changed, 16 insertions(+), 34 deletions(-)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp.c b/drivers/phy/qualcomm/phy-qcom-qmp.c
index 76acaec..90794dd 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp.c
@@ -555,7 +555,7 @@ struct qcom_qmp {
struct device *dev;
void __iomem *serdes;
- struct clk **clks;
+ struct clk_bulk_data *clks;
struct reset_control **resets;
struct regulator_bulk_data *vregs;
@@ -848,22 +848,19 @@ static int qcom_qmp_phy_init(struct phy *phy)
void __iomem *pcs = qphy->pcs;
void __iomem *status;
unsigned int mask, val;
- int ret, i;
+ int ret;
dev_vdbg(qmp->dev, "Initializing QMP phy\n");
- for (i = 0; i < qmp->cfg->num_clks; i++) {
- ret = clk_prepare_enable(qmp->clks[i]);
- if (ret) {
- dev_err(qmp->dev, "failed to enable %s clk, err=%d\n",
- qmp->cfg->clk_list[i], ret);
- goto err_clk;
- }
+ ret = clk_bulk_prepare_enable(cfg->num_clks, qmp->clks);
+ if (ret) {
+ dev_err(qmp->dev, "failed to enable clks, err=%d\n", ret);
+ return ret;
}
ret = qcom_qmp_phy_com_init(qmp);
if (ret)
- goto err_clk;
+ goto err_com_init;
if (cfg->has_lane_rst) {
ret = reset_control_deassert(qphy->lane_rst);
@@ -918,9 +915,8 @@ static int qcom_qmp_phy_init(struct phy *phy)
reset_control_assert(qphy->lane_rst);
err_lane_rst:
qcom_qmp_phy_com_exit(qmp);
-err_clk:
- while (--i >= 0)
- clk_disable_unprepare(qmp->clks[i]);
+err_com_init:
+ clk_bulk_disable_unprepare(cfg->num_clks, qmp->clks);
return ret;
}
@@ -930,7 +926,6 @@ static int qcom_qmp_phy_exit(struct phy *phy)
struct qmp_phy *qphy = phy_get_drvdata(phy);
struct qcom_qmp *qmp = qphy->qmp;
const struct qmp_phy_cfg *cfg = qmp->cfg;
- int i = cfg->num_clks;
clk_disable_unprepare(qphy->pipe_clk);
@@ -948,8 +943,7 @@ static int qcom_qmp_phy_exit(struct phy *phy)
qcom_qmp_phy_com_exit(qmp);
- while (--i >= 0)
- clk_disable_unprepare(qmp->clks[i]);
+ clk_bulk_disable_unprepare(cfg->num_clks, qmp->clks);
return 0;
}
@@ -998,29 +992,17 @@ static int qcom_qmp_phy_reset_init(struct device *dev)
static int qcom_qmp_phy_clk_init(struct device *dev)
{
struct qcom_qmp *qmp = dev_get_drvdata(dev);
- int ret, i;
+ int num = qmp->cfg->num_clks;
+ int i;
- qmp->clks = devm_kcalloc(dev, qmp->cfg->num_clks,
- sizeof(*qmp->clks), GFP_KERNEL);
+ qmp->clks = devm_kcalloc(dev, num, sizeof(*qmp->clks), GFP_KERNEL);
if (!qmp->clks)
return -ENOMEM;
- for (i = 0; i < qmp->cfg->num_clks; i++) {
- struct clk *_clk;
- const char *name = qmp->cfg->clk_list[i];
-
- _clk = devm_clk_get(dev, name);
- if (IS_ERR(_clk)) {
- ret = PTR_ERR(_clk);
- if (ret != -EPROBE_DEFER)
- dev_err(dev, "failed to get %s clk, %d\n",
- name, ret);
- return ret;
- }
- qmp->clks[i] = _clk;
- }
+ for (i = 0; i < num; i++)
+ qmp->clks->id = qmp->cfg->clk_list[i];
- return 0;
+ return devm_clk_bulk_get(dev, num, qmp->clks);
}
/*
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
^ permalink raw reply related
* [PATCH 3/6] nvme: claim block devices
From: Johannes Thumshirn @ 2017-10-05 6:51 UTC (permalink / raw)
In-Reply-To: <yq1poa2wgd2.fsf@oracle.com>
On Wed, Oct 04, 2017@09:08:57PM -0400, Martin K. Petersen wrote:
>
> Christoph,
>
> > The only other option I could think of would be to turn names around:
> > make /dev/nvmeX (chardev) and /dev/nvmeXnY the per-subsystem devices
> > that are multipathed if available. We'd then need new devices for the
> > invdividual controllers.
>
> I like that approach.
/me too
Byte,
Johannes
--
Johannes Thumshirn Storage
jthumshirn at suse.de +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
^ permalink raw reply
* Re: ✓ Fi.CI.BAT: success for igt/kms_rotation_crc: Add horizontal flip subtest.
From: Arkadiusz Hiler @ 2017-10-05 6:50 UTC (permalink / raw)
To: intel-gfx
In-Reply-To: <20171005010856.10085.60022@emeril.freedesktop.org>
On Thu, Oct 05, 2017 at 01:08:56AM +0000, Patchwork wrote:
> == Series Details ==
>
> Series: igt/kms_rotation_crc: Add horizontal flip subtest.
> URL : https://patchwork.freedesktop.org/series/31407/
> State : success
>
> == Summary ==
>
> IGT patchset tested on top of latest successful build
> 7f93a2632aae7c5865823b4a2fa4cd8c2a1c0977 Update NEWS, bump version to 1.20.
>
> with latest DRM-Tip kernel build CI_DRM_3177
> bdec858d405f drm-tip: 2017y-10m-04d-22h-54m-38s UTC integration manifest
>
> Testlist changes:
> +igt@kms_rotation_crc@primary-x-tiled-reflect-x-0
> +igt@kms_rotation_crc@primary-x-tiled-reflect-x-0
It's not actually a success, piglit just blows up because you introduce
multiple subtests with the same name:
Fatal Error: A test has already been assigned the name:
igt@kms_rotation_crc@primary-x-tiled-reflect-x-0 and both tests are the same.
Please fix that.
Now I have to figure out how to handle failures in similar cases more
gracefully on the IGT/CI side and not report false positives.
> +igt@kms_rotation_crc@primary-x-tiled-reflect-x-180
> +igt@kms_rotation_crc@primary-x-tiled-reflect-x-180
> +igt@kms_rotation_crc@primary-yf-tiled-reflect-x-0
> +igt@kms_rotation_crc@primary-yf-tiled-reflect-x-0
> +igt@kms_rotation_crc@primary-yf-tiled-reflect-x-90
> +igt@kms_rotation_crc@primary-yf-tiled-reflect-x-90
> +igt@kms_rotation_crc@primary-yf-tiled-reflect-x-180
> +igt@kms_rotation_crc@primary-yf-tiled-reflect-x-180
> +igt@kms_rotation_crc@primary-yf-tiled-reflect-x-270
> +igt@kms_rotation_crc@primary-yf-tiled-reflect-x-270
> +igt@kms_rotation_crc@primary-y-tiled-reflect-x-0
> +igt@kms_rotation_crc@primary-y-tiled-reflect-x-0
> +igt@kms_rotation_crc@primary-y-tiled-reflect-x-90
> +igt@kms_rotation_crc@primary-y-tiled-reflect-x-90
> +igt@kms_rotation_crc@primary-y-tiled-reflect-x-180
> +igt@kms_rotation_crc@primary-y-tiled-reflect-x-180
> +igt@kms_rotation_crc@primary-y-tiled-reflect-x-270
> +igt@kms_rotation_crc@primary-y-tiled-reflect-x-270
>
>
> == Logs ==
>
> For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_299/
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* Re: [PATCH] header: fix compile error on PowerPC (PPC_85xx)
From: Johannes Berg @ 2017-10-05 6:49 UTC (permalink / raw)
To: Hauke Mehrtens; +Cc: backports
In-Reply-To: <a47cbe26-26fb-cfb6-f7cd-17d77153ea66@hauke-m.de>
On Mon, 2017-10-02 at 20:31 +0200, Hauke Mehrtens wrote:
> On 10/02/2017 02:39 PM, Johannes Berg wrote:
> > On Sun, 2017-10-01 at 21:38 +0200, Hauke Mehrtens wrote:
> > > Including linux/interrupt.h in linux/hrtimer.h causes this error
> > > message
> > > on PowerPC builds on x86, ARM and MIPS it works:
> >
> > I think I also saw this on x86 on older kernel versions, and
> > couldn't
> > really figure out what was causing it...
>
> I haven't fully understood this issue, but the LEDE build bot found
> it
> on multiple PowerPC based systems. With this patch applied it is
> compiling on all targets.
>
> I ran the build test script on the compat server and it was fine with
> this patch applied for all kernel versions that worked before.
Ok.
> > > The backport of the hrtimer_start() functions needs the
> > > linux/interrupt.h because some parts are defined there. Fix this
> > > by
> > > moving the hrtimer_start() backport to the linux/interrupt.h
> > > backport
> > > header file.
> >
> > Does hrtimre.h always include interrupt.h, so that we get it in
> > when
> > somebody includes just hrtimer.h?
>
> I do not know, it is not included directly.
I guess we'll find out :-)
I'll apply this.
thanks,
johannes
--
To unsubscribe from this list: send the line "unsubscribe backports" in
^ permalink raw reply
* Re: [PATCH 1/2] Revert "vmalloc: back off when the current task is killed"
From: Vlastimil Babka @ 2017-10-05 6:49 UTC (permalink / raw)
To: Johannes Weiner, Andrew Morton
Cc: Alan Cox, Christoph Hellwig, Michal Hocko, linux-mm, linux-kernel,
kernel-team
In-Reply-To: <20171004185906.GB2136@cmpxchg.org>
On 10/04/2017 08:59 PM, Johannes Weiner wrote:
> This reverts commit 5d17a73a2ebeb8d1c6924b91e53ab2650fe86ffb and
> commit 171012f561274784160f666f8398af8b42216e1f.
>
> 5d17a73a2ebe ("vmalloc: back off when the current task is killed")
> made all vmalloc allocations from a signal-killed task fail. We have
> seen crashes in the tty driver from this, where a killed task exiting
> tries to switch back to N_TTY, fails n_tty_open because of the vmalloc
> failing, and later crashes when dereferencing tty->disc_data.
>
> Arguably, relying on a vmalloc() call to succeed in order to properly
> exit a task is not the most robust way of doing things. There will be
> a follow-up patch to the tty code to fall back to the N_NULL ldisc.
>
> But the justification to make that vmalloc() call fail like this isn't
> convincing, either. The patch mentions an OOM victim exhausting the
> memory reserves and thus deadlocking the machine. But the OOM killer
> is only one, improbable source of fatal signals. It doesn't make sense
> to fail allocations preemptively with plenty of memory in most cases.
>
> The patch doesn't mention real-life instances where vmalloc sites
> would exhaust memory, which makes it sound more like a theoretical
> issue to begin with. But just in case, the OOM access to memory
> reserves has been restricted on the allocator side in cd04ae1e2dc8
> ("mm, oom: do not rely on TIF_MEMDIE for memory reserves access"),
> which should take care of any theoretical concerns on that front.
>
> Revert this patch, and the follow-up that suppresses the allocation
> warnings when we fail the allocations due to a signal.
>
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
> ---
> mm/vmalloc.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index 8a43db6284eb..673942094328 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -1695,11 +1695,6 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
> for (i = 0; i < area->nr_pages; i++) {
> struct page *page;
>
> - if (fatal_signal_pending(current)) {
> - area->nr_pages = i;
> - goto fail_no_warn;
> - }
> -
> if (node == NUMA_NO_NODE)
> page = alloc_page(alloc_mask|highmem_mask);
> else
> @@ -1723,7 +1718,6 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
> warn_alloc(gfp_mask, NULL,
> "vmalloc: allocation failure, allocated %ld of %ld bytes",
> (area->nr_pages*PAGE_SIZE), area->size);
> -fail_no_warn:
> vfree(area->addr);
> return NULL;
> }
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
^ permalink raw reply
* Re: [PATCH 1/2] Revert "vmalloc: back off when the current task is killed"
From: Vlastimil Babka @ 2017-10-05 6:49 UTC (permalink / raw)
To: Johannes Weiner, Andrew Morton
Cc: Alan Cox, Christoph Hellwig, Michal Hocko, linux-mm, linux-kernel,
kernel-team
In-Reply-To: <20171004185906.GB2136@cmpxchg.org>
On 10/04/2017 08:59 PM, Johannes Weiner wrote:
> This reverts commit 5d17a73a2ebeb8d1c6924b91e53ab2650fe86ffb and
> commit 171012f561274784160f666f8398af8b42216e1f.
>
> 5d17a73a2ebe ("vmalloc: back off when the current task is killed")
> made all vmalloc allocations from a signal-killed task fail. We have
> seen crashes in the tty driver from this, where a killed task exiting
> tries to switch back to N_TTY, fails n_tty_open because of the vmalloc
> failing, and later crashes when dereferencing tty->disc_data.
>
> Arguably, relying on a vmalloc() call to succeed in order to properly
> exit a task is not the most robust way of doing things. There will be
> a follow-up patch to the tty code to fall back to the N_NULL ldisc.
>
> But the justification to make that vmalloc() call fail like this isn't
> convincing, either. The patch mentions an OOM victim exhausting the
> memory reserves and thus deadlocking the machine. But the OOM killer
> is only one, improbable source of fatal signals. It doesn't make sense
> to fail allocations preemptively with plenty of memory in most cases.
>
> The patch doesn't mention real-life instances where vmalloc sites
> would exhaust memory, which makes it sound more like a theoretical
> issue to begin with. But just in case, the OOM access to memory
> reserves has been restricted on the allocator side in cd04ae1e2dc8
> ("mm, oom: do not rely on TIF_MEMDIE for memory reserves access"),
> which should take care of any theoretical concerns on that front.
>
> Revert this patch, and the follow-up that suppresses the allocation
> warnings when we fail the allocations due to a signal.
>
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
> ---
> mm/vmalloc.c | 6 ------
> 1 file changed, 6 deletions(-)
>
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index 8a43db6284eb..673942094328 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -1695,11 +1695,6 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
> for (i = 0; i < area->nr_pages; i++) {
> struct page *page;
>
> - if (fatal_signal_pending(current)) {
> - area->nr_pages = i;
> - goto fail_no_warn;
> - }
> -
> if (node == NUMA_NO_NODE)
> page = alloc_page(alloc_mask|highmem_mask);
> else
> @@ -1723,7 +1718,6 @@ static void *__vmalloc_area_node(struct vm_struct *area, gfp_t gfp_mask,
> warn_alloc(gfp_mask, NULL,
> "vmalloc: allocation failure, allocated %ld of %ld bytes",
> (area->nr_pages*PAGE_SIZE), area->size);
> -fail_no_warn:
> vfree(area->addr);
> return NULL;
> }
>
^ permalink raw reply
* Re: [PATCH] selinux: check CAP_SETFCAP for a particular inode & mapped user
From: Serge E. Hallyn @ 2017-10-05 6:48 UTC (permalink / raw)
To: Lubomir Rintel
Cc: linux-security-module, Serge E . Hallyn, Eric W . Biederman,
linux-kernel, Paul Moore, Stephen Smalley, Eric Paris
In-Reply-To: <20171005061611.6649-1-lkundrak@v3.sk>
On Thu, Oct 05, 2017 at 08:16:11AM +0200, Lubomir Rintel wrote:
> This allows setting "security.capability" xattr by a user that has
> CAP_SETFCAP in an userns with SELinux. Namespaced capabilities are
> supported, as of commit 8db6c34f1dbc ("Introduce v3 namespaced file
> capabilities").
>
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
The fix is already on its way into the kernel - see the thread at
https://marc.info/?l=selinux&m=150713903925728&w=2
Thanks though :)
-serge
> ---
> A casual warning: Please not assume I know what I'm really doing. I can now
> install iputils and /bin/ping in a LXC container, which is great, but I
> typically wouldn't be allowed anywhere near anything security related.
>
> Thank you!
>
> security/selinux/hooks.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index f5d304736852..7bc5f4ffb4e0 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -3127,11 +3127,12 @@ static int selinux_inode_getattr(const struct path *path)
> static int selinux_inode_setotherxattr(struct dentry *dentry, const char *name)
> {
> const struct cred *cred = current_cred();
> + struct inode *inode = d_backing_inode(dentry);
>
> if (!strncmp(name, XATTR_SECURITY_PREFIX,
> sizeof XATTR_SECURITY_PREFIX - 1)) {
> if (!strcmp(name, XATTR_NAME_CAPS)) {
> - if (!capable(CAP_SETFCAP))
> + if (!capable_wrt_inode_uidgid(inode, CAP_SETFCAP))
> return -EPERM;
> } else if (!capable(CAP_SYS_ADMIN)) {
> /* A different attribute in the security namespace.
> --
> 2.13.6
^ permalink raw reply
* [PATCH] selinux: check CAP_SETFCAP for a particular inode & mapped user
From: Serge E. Hallyn @ 2017-10-05 6:48 UTC (permalink / raw)
To: linux-security-module
In-Reply-To: <20171005061611.6649-1-lkundrak@v3.sk>
On Thu, Oct 05, 2017 at 08:16:11AM +0200, Lubomir Rintel wrote:
> This allows setting "security.capability" xattr by a user that has
> CAP_SETFCAP in an userns with SELinux. Namespaced capabilities are
> supported, as of commit 8db6c34f1dbc ("Introduce v3 namespaced file
> capabilities").
>
> Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
The fix is already on its way into the kernel - see the thread at
https://marc.info/?l=selinux&m=150713903925728&w=2
Thanks though :)
-serge
> ---
> A casual warning: Please not assume I know what I'm really doing. I can now
> install iputils and /bin/ping in a LXC container, which is great, but I
> typically wouldn't be allowed anywhere near anything security related.
>
> Thank you!
>
> security/selinux/hooks.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
> index f5d304736852..7bc5f4ffb4e0 100644
> --- a/security/selinux/hooks.c
> +++ b/security/selinux/hooks.c
> @@ -3127,11 +3127,12 @@ static int selinux_inode_getattr(const struct path *path)
> static int selinux_inode_setotherxattr(struct dentry *dentry, const char *name)
> {
> const struct cred *cred = current_cred();
> + struct inode *inode = d_backing_inode(dentry);
>
> if (!strncmp(name, XATTR_SECURITY_PREFIX,
> sizeof XATTR_SECURITY_PREFIX - 1)) {
> if (!strcmp(name, XATTR_NAME_CAPS)) {
> - if (!capable(CAP_SETFCAP))
> + if (!capable_wrt_inode_uidgid(inode, CAP_SETFCAP))
> return -EPERM;
> } else if (!capable(CAP_SYS_ADMIN)) {
> /* A different attribute in the security namespace.
> --
> 2.13.6
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" 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
* Re: [PATCH] net/mac80211/mesh_plink: Convert timers to use
From: Johannes Berg @ 2017-10-05 6:47 UTC (permalink / raw)
To: Kees Cook, linux-kernel
Cc: David S. Miller, linux-wireless, netdev, Thomas Gleixner
In-Reply-To: <20171005004952.GA23133@beast>
On Wed, 2017-10-04 at 17:49 -0700, Kees Cook wrote:
> In preparation for unconditionally passing the struct timer_list
> pointer to all timer callbacks, switch to using the new timer_setup()
> and from_timer() to pass the timer pointer explicitly. This requires
> adding a pointer back to the sta_info since container_of() can't
> resolve the sta_info.
The subject seems to be lacking something ... :-)
> This requires commit 686fef928bba ("timer: Prepare to change timer
> callback argument type") in v4.14-rc3, but should be otherwise
> stand-alone.
I still can't apply that because that's not in net-next right now.
> static inline void mesh_plink_timer_set(struct sta_info *sta, u32
> timeout)
> {
> sta->mesh->plink_timer.expires = jiffies +
> msecs_to_jiffies(timeout);
> - sta->mesh->plink_timer.data = (unsigned long) sta;
> - sta->mesh->plink_timer.function = mesh_plink_timer;
> + sta->mesh->plink_sta = sta;
> + sta->mesh->plink_timer.function =
> (TIMER_FUNC_TYPE)mesh_plink_timer;
> sta->mesh->plink_timeout = timeout;
> add_timer(&sta->mesh->plink_timer);
Wouldn't it be better to convert this to timer_setup() now?
That add_timer() should probably also be mod_timer() anyway?
> diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
> index 69615016d5bf..5e5de9455e4e 100644
> --- a/net/mac80211/sta_info.c
> +++ b/net/mac80211/sta_info.c
> @@ -332,7 +332,7 @@ struct sta_info *sta_info_alloc(struct
> ieee80211_sub_if_data *sdata,
> spin_lock_init(&sta->mesh->plink_lock);
> if (ieee80211_vif_is_mesh(&sdata->vif) &&
> !sdata->u.mesh.user_mpm)
> - init_timer(&sta->mesh->plink_timer);
> + timer_setup(&sta->mesh->plink_timer, NULL,
> 0);
> sta->mesh->nonpeer_pm = NL80211_MESH_POWER_ACTIVE;
> }
You just have to make mesh_plink_timer() non-static, put a prototype
into mesh.h and then you can use the proper timer_setup() here with the
function?
Also, the sta->mesh->plink_sta assignment should be here I'd say, no
point rewriting it all the time.
I guess you were shooting for minimal, and I suppose we can do the
cleanups later too ...
johannes
^ permalink raw reply
* [U-Boot] [PATCH] armv8: ls1088a: Update MC boot sequence
From: Bogdan Purcareata @ 2017-10-05 6:46 UTC (permalink / raw)
To: u-boot
In-Reply-To: <VI1PR04MB20786003161EFD37954F31CB9A730@VI1PR04MB2078.eurprd04.prod.outlook.com>
Hello York,
> -----Original Message-----
> From: York Sun
> Sent: Wednesday, October 04, 2017 8:22 PM
> To: Bogdan Purcareata <bogdan.purcareata@nxp.com>; Prabhakar Kushwaha
> <prabhakar.kushwaha@nxp.com>; Ashish Kumar <ashish.kumar@nxp.com>; u-
> boot at lists.denx.de
> Subject: Re: [PATCH] armv8: ls1088a: Update MC boot sequence
>
> On 10/04/2017 02:10 AM, Bogdan Purcareata wrote:
> > This patch follows the work of previous commits:
> > 5707dfb02e drivers: net: fsl-mc: Fixup MAC addresses in DPC
> > 33a8991a87 drivers: net: fsl-mc: Link MC boot to PHY_RESET_R
> > 1161dbcc0a drivers: net: fsl-mc: Include MAC addr fixup to DPL
>
> These are not commit message. They belong to under the --- line under
> your signature.
I mentioned the patches to provide the overall context of the refactoring work.
> >
> > Add support for LS1088 platforms, to make sure u-boot env MAC addresses
> > are properly set in DPC / DPL.
>
> This message doesn't match the change. You are removing mc_boot_env_var
> from qds and rdb files and replace it with a common function call to
> reset phy. You are not actually adding support for LS1088 platforms.
> Please revise your commit message.
I agree I was ambiguous there - I was referring to the support mentioned in the above patches.
I will send a v2 to incorporate your suggestions.
Thank you!
Bogdan P.
^ permalink raw reply
* [U-Boot] [PATCH v3] arm64: ls1012ardb: Add distro boot support
From: Rajesh Bhagat @ 2017-10-05 6:43 UTC (permalink / raw)
To: u-boot
In-Reply-To: <VI1PR04MB207867075FB2257931B79A179A720@VI1PR04MB2078.eurprd04.prod.outlook.com>
> -----Original Message-----
> From: York Sun
> Sent: Tuesday, October 03, 2017 9:21 PM
> To: Rajesh Bhagat <rajesh.bhagat@nxp.com>; u-boot at lists.denx.de
> Cc: Bhaskar Upadhaya <bhaskar.upadhaya@nxp.com>
> Subject: Re: [PATCH v3] arm64: ls1012ardb: Add distro boot support
>
> On 09/07/2017 02:54 AM, Rajesh Bhagat wrote:
> > Include common config_distro_defaults.h and config_distro_bootcmd.h
> > for u-boot enviroments to support automatical distro boot which scan
> > boot.scr from external storage devices(e.g. SD and USB) and execute
> > autoboot script.
> >
> > Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
> > Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
> > ---
> > Depends on:
> > https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatc
> >
> hwork.ozlabs.org%2Fpatch%2F808617%2F&data=01%7C01%7Cyork.sun%40nxp.com
> > %7Cec17398f0bac430809e208d4f5d67019%7C686ea1d3bc2b4c6fa92cd99c5c301635
> >
> %7C0&sdata=7T16y92iBEfCqAZxf8kIPDXbRSdSMl%2FvCxrI5CQ%2BzYk%3D&reserve
> d
> > =0
> >
> > Changes in v3:
> > Removed pfe stop command from BOOTCMD
> >
> > Changes in v2:
> > Rebased to latest u-boot
> >
> > configs/ls1012ardb_qspi_defconfig | 1 +
> > include/configs/ls1012a_common.h | 10 ++++++++-
> > include/configs/ls1012ardb.h | 45
> +++++++++++++++++++++++++++++++++++++++
> > 3 files changed, 55 insertions(+), 1 deletion(-)
> >
> > diff --git a/configs/ls1012ardb_qspi_defconfig
> > b/configs/ls1012ardb_qspi_defconfig
> > index 81702e3..39d7a54 100644
> > --- a/configs/ls1012ardb_qspi_defconfig
> > +++ b/configs/ls1012ardb_qspi_defconfig
> > @@ -50,3 +50,4 @@ CONFIG_DM_USB=y
> > CONFIG_USB_XHCI_HCD=y
> > CONFIG_USB_XHCI_DWC3=y
> > CONFIG_USB_STORAGE=y
> > +CONFIG_DISTRO_DEFAULTS=y
> > diff --git a/include/configs/ls1012a_common.h
> > b/include/configs/ls1012a_common.h
> > index 020c506..95ba24d 100644
> > --- a/include/configs/ls1012a_common.h
> > +++ b/include/configs/ls1012a_common.h
> > @@ -90,6 +90,14 @@
> > #define CONFIG_HWCONFIG
> > #define HWCONFIG_BUFFER_SIZE 128
> >
> > +#include <config_distro_defaults.h>
> > +#ifndef CONFIG_SPL_BUILD
> > +#define BOOT_TARGET_DEVICES(func) \
> > + func(MMC, mmc, 0) \
> > + func(USB, usb, 0)
> > +#include <config_distro_bootcmd.h>
> > +#endif
> > +
> > /* Initial environment variables */
> > #define CONFIG_EXTRA_ENV_SETTINGS \
> > "verify=no\0" \
> > @@ -101,6 +109,7 @@
> > "kernel_load=0xa0000000\0" \
> > "kernel_size=0x2800000\0" \
> >
> > +#undef CONFIG_BOOTCOMMAND
> > #define CONFIG_BOOTCOMMAND "sf probe 0:0; sf read $kernel_load "\
> > "$kernel_start $kernel_size && "\
> > "bootm $kernel_load"
> > @@ -108,7 +117,6 @@
> > /* Monitor Command Prompt */
> > #define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */
> > #define CONFIG_SYS_LONGHELP
> > -#define CONFIG_CMDLINE_EDITING 1
> > #define CONFIG_AUTO_COMPLETE
> > #define CONFIG_SYS_MAXARGS 64 /* max command args */
> >
> > diff --git a/include/configs/ls1012ardb.h
> > b/include/configs/ls1012ardb.h index e9edcd2..f4675a0 100644
> > --- a/include/configs/ls1012ardb.h
> > +++ b/include/configs/ls1012ardb.h
> > @@ -70,6 +70,51 @@
> > #define CONFIG_SYS_MEMTEST_START 0x80000000
> > #define CONFIG_SYS_MEMTEST_END 0x9fffffff
> >
> > +#undef CONFIG_EXTRA_ENV_SETTINGS
> > +#define CONFIG_EXTRA_ENV_SETTINGS \
> > + "verify=no\0" \
> > + "fdt_high=0xffffffffffffffff\0" \
> > + "initrd_high=0xffffffffffffffff\0" \
> > + "fdt_addr=0x00f00000\0" \
> > + "kernel_addr=0x01000000\0" \
> > + "scriptaddr=0x80000000\0" \
> > + "fdtheader_addr_r=0x80100000\0" \
> > + "kernelheader_addr_r=0x80200000\0" \
> > + "kernel_addr_r=0x81000000\0" \
> > + "fdt_addr_r=0x90000000\0" \
> > + "load_addr=0xa0000000\0" \
> > + "kernel_size=0x2800000\0" \
> > + "console=ttyS0,115200\0" \
> > + BOOTENV \
> > + "boot_scripts=ls1012ardb_boot.scr\0" \
> > + "scan_dev_for_boot_part=" \
> > + "part list ${devtype} ${devnum} devplist; " \
> > + "env exists devplist || setenv devplist 1; " \
> > + "for distro_bootpart in ${devplist}; do " \
> > + "if fstype ${devtype} " \
> > + "${devnum}:${distro_bootpart} " \
> > + "bootfstype; then " \
> > + "run scan_dev_for_boot; " \
> > + "fi; " \
> > + "done\0" \
> > + "scan_dev_for_boot=" \
> > + "echo Scanning ${devtype} " \
> > + "${devnum}:${distro_bootpart}...; " \
> > + "for prefix in ${boot_prefixes}; do " \
> > + "run scan_dev_for_scripts; " \
> > + "done;" \
> > + "\0" \
> > + "installer=load mmc 0:2 $load_addr " \
> > + "/flex_installer_arm64.itb; " \
> > + "bootm $load_addr#$board\0" \
> > + "qspi_bootcmd=echo Trying load from qspi..;" \
> > + "sf probe && sf read $load_addr " \
> > + "$kernel_addr $kernel_size && bootm $load_addr#$board\0" \
> > +
>
> You have "\" at the end of line above. Did you intentionally leave it there?
>
Its added by mistake. Will remove it in v4.
> > +#undef CONFIG_BOOTCOMMAND
> > +#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) #define
> > +CONFIG_BOOTCOMMAND "run distro_bootcmd;run qspi_bootcmd"
> > +#endif
>
> You will not have CONFIG_BOOTCOMMAND for other than QSPI and SD boot.
>
Will drop the #if in v4.
- Rajesh
> York
^ permalink raw reply
* [U-Boot] [PATCH] arm64: ls1012afrdm: Add distro boot support
From: Rajesh Bhagat @ 2017-10-05 6:42 UTC (permalink / raw)
To: u-boot
In-Reply-To: <VI1PR04MB2078894DFCF290856C8CA1D89A720@VI1PR04MB2078.eurprd04.prod.outlook.com>
> -----Original Message-----
> From: York Sun
> Sent: Tuesday, October 03, 2017 9:16 PM
> To: Rajesh Bhagat <rajesh.bhagat@nxp.com>; u-boot at lists.denx.de
> Cc: Bhaskar Upadhaya <bhaskar.upadhaya@nxp.com>
> Subject: Re: [PATCH] arm64: ls1012afrdm: Add distro boot support
>
> On 09/07/2017 10:10 PM, Rajesh Bhagat wrote:
> > Include common config_distro_defaults.h and config_distro_bootcmd.h
> > for u-boot enviroments to support automatical distro boot which scan
> > boot.scr from external storage devices(e.g. SD and USB) and execute
> > autoboot script.
> >
> > Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
> > Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
> > ---
> > configs/ls1012afrdm_qspi_defconfig | 1 +
> > include/configs/ls1012afrdm.h | 59
> ++++++++++++++++++++++++++++++++------
> > 2 files changed, 51 insertions(+), 9 deletions(-)
> >
> > diff --git a/configs/ls1012afrdm_qspi_defconfig
> > b/configs/ls1012afrdm_qspi_defconfig
> > index fe95f04..42acff0 100644
> > --- a/configs/ls1012afrdm_qspi_defconfig
> > +++ b/configs/ls1012afrdm_qspi_defconfig
> > @@ -46,3 +46,4 @@ CONFIG_DM_USB=y
> > CONFIG_USB_XHCI_HCD=y
> > CONFIG_USB_XHCI_DWC3=y
> > CONFIG_USB_STORAGE=y
> > +CONFIG_DISTRO_DEFAULTS=y
> > diff --git a/include/configs/ls1012afrdm.h
> > b/include/configs/ls1012afrdm.h index 8a9444d..544dea0 100644
> > --- a/include/configs/ls1012afrdm.h
> > +++ b/include/configs/ls1012afrdm.h
> > @@ -20,16 +20,57 @@
> > #define CONFIG_SYS_MEMTEST_START 0x80000000
> > #define CONFIG_SYS_MEMTEST_END 0x9fffffff
> >
> > +#ifndef CONFIG_SPL_BUILD
> > +#undef BOOT_TARGET_DEVICES
> > +#define BOOT_TARGET_DEVICES(func) \
> > + func(USB, usb, 0)
> > +#endif
> > +
> > #undef CONFIG_EXTRA_ENV_SETTINGS
> > -#define CONFIG_EXTRA_ENV_SETTINGS \
> > - "verify=no\0" \
> > - "loadaddr=0x80100000\0" \
> > - "kernel_addr=0x100000\0" \
> > - "fdt_high=0xffffffffffffffff\0" \
> > - "initrd_high=0xffffffffffffffff\0" \
> > - "kernel_start=0x1000000\0" \
> > - "kernel_load=0x96000000\0" \
> > - "kernel_size=0x2800000\0"
> > +#define CONFIG_EXTRA_ENV_SETTINGS \
> > + "verify=no\0" \
> > + "fdt_high=0xffffffffffffffff\0" \
> > + "initrd_high=0xffffffffffffffff\0" \
> > + "fdt_addr=0x00f00000\0" \
> > + "kernel_addr=0x01000000\0" \
> > + "scriptaddr=0x80000000\0" \
> > + "fdtheader_addr_r=0x80100000\0" \
> > + "kernelheader_addr_r=0x80200000\0" \
> > + "kernel_addr_r=0x96000000\0" \
> > + "fdt_addr_r=0x90000000\0" \
> > + "load_addr=0x96000000\0" \
> > + "kernel_size=0x2800000\0" \
> > + "console=ttyS0,115200\0" \
> > + BOOTENV \
> > + "boot_scripts=ls1012afrdm_boot.scr\0" \
> > + "scan_dev_for_boot_part=" \
> > + "part list ${devtype} ${devnum} devplist; " \
> > + "env exists devplist || setenv devplist 1; " \
> > + "for distro_bootpart in ${devplist}; do " \
> > + "if fstype ${devtype} " \
> > + "${devnum}:${distro_bootpart} " \
> > + "bootfstype; then " \
> > + "run scan_dev_for_boot; " \
> > + "fi; " \
> > + "done\0" \
> > + "scan_dev_for_boot=" \
> > + "echo Scanning ${devtype} " \
> > + "${devnum}:${distro_bootpart}...; " \
> > + "for prefix in ${boot_prefixes}; do " \
> > + "run scan_dev_for_scripts; " \
> > + "done;" \
> > + "\0" \
> > + "installer=load usb 0:2 $load_addr " \
> > + "/flex_installer_arm64.itb; " \
> > + "bootm $load_addr#$board\0" \
> > + "qspi_bootcmd=echo Trying load from qspi..;" \
> > + "sf probe && sf read $load_addr " \
> > + "$kernel_addr $kernel_size && bootm $load_addr#$board\0" \
>
> Did you intentionally leave the "\" at the end in above line?
Its added by mistake. Will remove it in v2.
> > +
> > +#undef CONFIG_BOOTCOMMAND
> > +#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI) #define
> > +CONFIG_BOOTCOMMAND "run distro_bootcmd;run qspi_bootcmd"
> > +#endif
>
> You will not have CONFIG_BOOTCOMMAND for other than QSPI and SD boot.
> You probably don't have other boot method. If so, you can drop the "#if".
>
Will drop the #if in v2.
- Rajesh
> York
^ permalink raw reply
* Re: [PATCH 2/6] ath9k: add a quirk to set use_msi automatically
From: AceLan Kao @ 2017-10-05 6:39 UTC (permalink / raw)
To: Daniel Drake
Cc: Kalle Valo, Christoph Hellwig, QCA ath9k Development,
linux-wireless, netdev, Linux-Kernel@Vger. Kernel. Org
In-Reply-To: <CAD8Lp46mdgbfCGY_i=N7FB1rMfL0KA0VFQxJESxshe4Cn6k4+Q@mail.gmail.com>
Hi all,
Please drop my patches, Qualcomm is working internally and will submit
the MSI patch by themselves.
Thanks.
Hi Daniel,
I'll try your patches tomorrow.
Best regards,
AceLan Kao.
2017-10-02 12:21 GMT+08:00 Daniel Drake <drake@endlessm.com>:
> Hi AceLan,
>
> On Thu, Sep 28, 2017 at 4:28 PM, AceLan Kao <acelan.kao@canonical.com> wrote:
>> Hi Daniel,
>>
>> I've tried your patch, but it doesn't work for me.
>> Wifi can scan AP, but can't get connected.
>
> Can you please clarify which patch(es) you have tried?
>
> This is the base patch which adds the infrastructure to request
> specific MSI IRQ vectors:
> https://marc.info/?l=linux-wireless&m=150631274108016&w=2
>
> This is the ath9k MSI patch which makes use of that:
> https://github.com/endlessm/linux/commit/739c7a924db8f4434a9617657
>
> If you were already able to use ath9k MSI interrupts without specific
> consideration for which MSI vector numbers were used, these are the
> possible explanations that spring to mind:
>
> 1. You got lucky and it picked a vector number that is 4-aligned. You
> can check this in the "lspci -vvv" output. You'll see something like:
> Capabilities: [50] MSI: Enable+ Count=1/4 Maskable+ 64bit+
> Address: 00000000fee0300c Data: 4142
> The lower number is the vector number. In my example here 0x42 (66) is
> not 4-aligned so the failure condition will be hit.
>
> 2. You are using interrupt remapping, which I suspect may provide a
> high likelihood of MSI interrupt vectors being 4-aligned. See if
> /proc/interrupts shows the IRQ type as IR-PCI-MSI
> Unfortunately interrupt remapping is not available here,
> https://lists.linuxfoundation.org/pipermail/iommu/2017-August/023717.html
>
> 3. My assumption that all ath9k hardware corrupts the MSI vector
> number could wrong. However we've seen this on different wifi modules
> in laptops produced by different OEMs and ODMs, so it seems to be a
> somewhat widespread problem at least.
>
> 4. My assumption that ath9k hardware is corrupting the MSI vector
> number could be wrong; maybe another component is to blame, could it
> be a BIOS issue? Admittedly I don't really know how I can debug the
> layers inbetween seeing the MSI Message Data value disagree with the
> vector number being handled inside do_IRQ().
>
> Daniel
^ permalink raw reply
* Re: [PATCH] conf: HdmiLpeAudio: remove the "front" pcm definition
From: Takashi Iwai @ 2017-10-05 6:38 UTC (permalink / raw)
To: Tanu Kaskinen; +Cc: alsa-devel
In-Reply-To: <20171004194400.14401-1-tanuk@iki.fi>
On Wed, 04 Oct 2017 21:44:00 +0200,
Tanu Kaskinen wrote:
>
> PulseAudio assumes that the "front" pcm device always refers to an
> analog device, not HDMI. While that assumption is not really valid, the
> reality is that without that assumption PulseAudio can't know whether
> "front" and "hdmi" refer to a different or the same device.
>
> The HDMI LPE driver doesn't allow audio streaming while the HDMI cable
> is unplugged, so PulseAudio has to know when it's plugged in and when
> it's not. If both "front" and "hdmi" devices exist, PulseAudio will
> notice that HDMI is unplugged, but it doesn't know that "front" refers
> to the same device, and PulseAudio will try to use the "front" device
> with bad consequences. The kernel driver's refusal to stream any audio
> makes PulseAudio enter an infinite loop and then the kernel kills
> PulseAudio, because it consumes too much CPU time in a realtime thread.
>
> While the looping in PulseAudio could probably be fixed, that wouldn't
> change the fact that PulseAudio thinks that there is an analog device. I
> believe it's best to avoid having the same device as both "front" and
> "hdmi" in alsa-lib.
>
> I removed also the surround configuration includes. I don't think they
> had any effect anyway, so I wonder why they were there in the first
> place.
These definitions are there for LPCM surround channels.
The biggest problem behind the scene is that we mixed up both logical
and physical configurations. The "front" or "surround51" belong to
the former, while "hdmi" belongs to the latter.
In the past, there was only SPDIF that has only two stereo channels,
so the logical configuration was fixed with that. We copied that
config for HDMI/DP, and now we hit the inconsistency more clearly...
I suppose the PA issue gets fixed just by this removal? If yes, I'm
willing to apply it, including in the next release.
thanks,
Takashi
>
> BugLink: https://bugs.freedesktop.org/show_bug.cgi?id=100488
> ---
> src/conf/cards/HdmiLpeAudio.conf | 24 ------------------------
> 1 file changed, 24 deletions(-)
>
> diff --git a/src/conf/cards/HdmiLpeAudio.conf b/src/conf/cards/HdmiLpeAudio.conf
> index 9fa30da0..a1e493da 100644
> --- a/src/conf/cards/HdmiLpeAudio.conf
> +++ b/src/conf/cards/HdmiLpeAudio.conf
> @@ -2,30 +2,6 @@
> # Configuration for the Intel HDMI/DP LPE audio
> #
>
> -<confdir:pcm/front.conf>
> -
> -HdmiLpeAudio.pcm.front.0 {
> - @args [ CARD ]
> - @args.CARD {
> - type string
> - }
> - type softvol
> - slave.pcm {
> - type hw
> - card $CARD
> - }
> - control {
> - name "PCM Playback Volume"
> - card $CARD
> - }
> -}
> -
> -<confdir:pcm/surround40.conf>
> -<confdir:pcm/surround21.conf>
> -<confdir:pcm/surround41.conf>
> -<confdir:pcm/surround50.conf>
> -<confdir:pcm/surround51.conf>
> -
> <confdir:pcm/hdmi.conf>
>
> HdmiLpeAudio.pcm.hdmi.0 {
> --
> 2.14.2
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
^ permalink raw reply
* Re: -|EXT|- Re: mono 5.0.1.1 TypeLoadException
From: Alex Lennon @ 2017-10-05 6:37 UTC (permalink / raw)
To: MUGRIDGE Robin; +Cc: yocto@yoctoproject.org
In-Reply-To: <51BE6D71ED8CFC4BA05434EB06711F5DD29642F5@UKCENMBX04.oxinst.com>
[-- Attachment #1: Type: text/plain, Size: 703 bytes --]
On 05/10/2017 07:22, MUGRIDGE Robin wrote:
>
> Hi,
>
> I’ve managed to track this down and it turned out to be nothing to do
> with mono.
>
> In the process of creating a test case, I found I had a reference to
> an old version of Npgsql (this is not provided via a yocto recipe).
> The old version I was referencing included an old version of
> Mono.Security.dll. My application found this version rather than the
> version delivered by Mono as it was in the application directory.
> Later versions of Npgsql have now dropped the inclusion of
> Mono.Security.dll.
>
>
Glad to hear you have it sorted out. Thanks for letting me know Robin.
Cheers,
Alex
[-- Attachment #2: Type: text/html, Size: 4186 bytes --]
^ permalink raw reply
* [PATCH v4 1/5] clk: Add clock driver for ASPEED BMC SoCs
From: Andrew Jeffery @ 2017-10-05 6:36 UTC (permalink / raw)
To: linux-arm-kernel
In-Reply-To: <20171003065540.11722-2-joel@jms.id.au>
On Tue, 2017-10-03 at 17:25 +1030, Joel Stanley wrote:
> This adds the stub of a driver for the ASPEED SoCs. The clocks are
> defined and the static registration is set up.
>?
> Signed-off-by: Joel Stanley <joel@jms.id.au>
With respect to use of the Aspeed hardware,
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
> ---
> v3:
> ?- use named initlisers for aspeed_gates table
> ?- fix clocks typo
> ?- Move ASPEED_NUM_CLKS to the bottom of the list
> ?- Put gates at the start of the list, so we can use them to initalise
> ???the aspeed_gates table
> ?- Add ASPEED_CLK_SELECTION_2
> ?- Set parent of network MAC gates
> ---
> ?drivers/clk/Kconfig??????????????????????|??12 +++
> ?drivers/clk/Makefile?????????????????????|???1 +
> ?drivers/clk/clk-aspeed.c?????????????????| 148 +++++++++++++++++++++++++++++++
> ?include/dt-bindings/clock/aspeed-clock.h |??42 +++++++++
> ?4 files changed, 203 insertions(+)
> ?create mode 100644 drivers/clk/clk-aspeed.c
> ?create mode 100644 include/dt-bindings/clock/aspeed-clock.h
>?
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index 1c4e1aa6767e..9abe063ef8d2 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -142,6 +142,18 @@ config COMMON_CLK_GEMINI
> ? ??This driver supports the SoC clocks on the Cortina Systems Gemini
> ? ??platform, also known as SL3516 or CS3516.
> ?
> +config COMMON_CLK_ASPEED
> + bool "Clock driver for Aspeed BMC SoCs"
> + depends on ARCH_ASPEED || COMPILE_TEST
> + default ARCH_ASPEED
> + select MFD_SYSCON
> + select RESET_CONTROLLER
> + ---help---
> + ??This driver supports the SoC clocks on the Aspeed BMC platforms.
> +
> + ??The G4 and G5 series, including the ast2400 and ast2500, are supported
> + ??by this driver.
> +
> ?config COMMON_CLK_S2MPS11
> ? tristate "Clock driver for S2MPS1X/S5M8767 MFD"
> ? depends on MFD_SEC_CORE || COMPILE_TEST
> diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> index c99f363826f0..575c68919d9b 100644
> --- a/drivers/clk/Makefile
> +++ b/drivers/clk/Makefile
> @@ -26,6 +26,7 @@ obj-$(CONFIG_ARCH_CLPS711X) += clk-clps711x.o
> ?obj-$(CONFIG_COMMON_CLK_CS2000_CP) += clk-cs2000-cp.o
> ?obj-$(CONFIG_ARCH_EFM32) += clk-efm32gg.o
> ?obj-$(CONFIG_COMMON_CLK_GEMINI) += clk-gemini.o
> +obj-$(CONFIG_COMMON_CLK_ASPEED) += clk-aspeed.o
> ?obj-$(CONFIG_ARCH_HIGHBANK) += clk-highbank.o
> ?obj-$(CONFIG_CLK_HSDK) += clk-hsdk-pll.o
> ?obj-$(CONFIG_COMMON_CLK_MAX77686) += clk-max77686.o
> diff --git a/drivers/clk/clk-aspeed.c b/drivers/clk/clk-aspeed.c
> new file mode 100644
> index 000000000000..a45eb351bb05
> --- /dev/null
> +++ b/drivers/clk/clk-aspeed.c
> @@ -0,0 +1,148 @@
> +/*
> + * Copyright 2017 IBM Corporation
> + *
> + * Joel Stanley <joel@jms.id.au>
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version
> + * 2 of the License, or (at your option) any later version.
> + */
> +
> +#define pr_fmt(fmt) "clk-aspeed: " fmt
> +
> +#include <linux/clk-provider.h>
> +#include <linux/mfd/syscon.h>
> +#include <linux/of_address.h>
> +#include <linux/regmap.h>
> +#include <linux/slab.h>
> +#include <linux/spinlock.h>
> +
> +#include <dt-bindings/clock/aspeed-clock.h>
> +
> +#define ASPEED_STRAP 0x70
> +
> +/* Keeps track of all clocks */
> +static struct clk_hw_onecell_data *aspeed_clk_data;
> +
> +static void __iomem *scu_base;
> +
> +/**
> + * struct aspeed_gate_data - Aspeed gated clocks
> + * @clock_idx: bit used to gate this clock in the clock register
> + * @reset_idx: bit used to reset this IP in the reset register. -1 if no
> + *?????????????reset is required when enabling the clock
> + * @name: the clock name
> + * @parent_name: the name of the parent clock
> + * @flags: standard clock framework flags
> + */
> +struct aspeed_gate_data {
> + u8 clock_idx;
> + s8 reset_idx;
> + const char *name;
> + const char *parent_name;
> + unsigned long flags;
> +};
> +
> +/**
> + * struct aspeed_clk_gate - Aspeed specific clk_gate structure
> + * @hw: handle between common and hardware-specific interfaces
> + * @reg: register controlling gate
> + * @clock_idx: bit used to gate this clock in the clock register
> + * @reset_idx: bit used to reset this IP in the reset register. -1 if no
> + * reset is required when enabling the clock
> + * @flags: hardware-specific flags
> + * @lock: register lock
> + *
> + * Some of the clocks in the Aspeed SoC must be put in reset before enabling.
> + * This modified version of clk_gate allows an optional reset bit to be
> + * specified.
> + */
> +struct aspeed_clk_gate {
> + struct clk_hw hw;
> + struct regmap *map;
> + u8 clock_idx;
> + s8 reset_idx;
> + u8 flags;
> + spinlock_t *lock;
> +};
> +
> +#define to_aspeed_clk_gate(_hw) container_of(_hw, struct aspeed_clk_gate, hw)
> +
> +/* TODO: ask Aspeed about the actual parent data */
> +static const struct aspeed_gate_data aspeed_gates[] __initconst = {
> + /* ?clk rst???name parent flags */
> + [ASPEED_CLK_GATE_ECLK] = {??0, -1, "eclk-gate", "eclk", 0 }, /* Video Engine */
> + [ASPEED_CLK_GATE_GCLK] = {??1,??7, "gclk-gate", NULL, 0 }, /* 2D engine */
> + [ASPEED_CLK_GATE_MCLK] = {??2, -1, "mclk-gate", "mpll", CLK_IS_CRITICAL }, /* SDRAM */
> + [ASPEED_CLK_GATE_VCLK] = {??3,??6, "vclk-gate", NULL, 0 }, /* Video Capture */
> + [ASPEED_CLK_GATE_BCLK] = {??4, 10, "bclk-gate", "bclk", 0 }, /* PCIe/PCI */
> + [ASPEED_CLK_GATE_DCLK] = {??5, -1, "dclk-gate", NULL, 0 }, /* DAC */
> + [ASPEED_CLK_GATE_REFCLK] = {??6, -1, "refclk-gate", "clkin", CLK_IS_CRITICAL },
> + [ASPEED_CLK_GATE_USBPORT2CLK] = {??7,??3, "usb-port2-gate", NULL, 0 }, /* USB2.0 Host port 2 */
> + [ASPEED_CLK_GATE_LCLK] = {??8,??5, "lclk-gate", NULL, 0 }, /* LPC */
> + [ASPEED_CLK_GATE_USBUHCICLK] = {??9, 15, "usb-uhci-gate", NULL, 0 }, /* USB1.1 (requires port 2 enabled) */
> + [ASPEED_CLK_GATE_D1CLK] = { 10, 13, "d1clk-gate", NULL, 0 }, /* GFX CRT */
> + [ASPEED_CLK_GATE_YCLK] = { 13,??4, "yclk-gate", NULL, 0 }, /* HAC */
> + [ASPEED_CLK_GATE_USBPORT1CLK] = { 14, 14, "usb-port1-gate", NULL, 0 }, /* USB2 hub/USB2 host port 1/USB1.1 dev */
> + [ASPEED_CLK_GATE_UART1CLK] = { 15, -1, "uart1clk-gate", "uart", 0 }, /* UART1 */
> + [ASPEED_CLK_GATE_UART2CLK] = { 16, -1, "uart2clk-gate", "uart", 0 }, /* UART2 */
> + [ASPEED_CLK_GATE_UART5CLK] = { 17, -1, "uart5clk-gate", "uart", 0 }, /* UART5 */
> + [ASPEED_CLK_GATE_ESPICLK] = { 19, -1, "espiclk-gate", NULL, 0 }, /* eSPI */
> + [ASPEED_CLK_GATE_MAC1CLK] = { 20, 11, "mac1clk-gate", "mac", 0 }, /* MAC1 */
> + [ASPEED_CLK_GATE_MAC2CLK] = { 21, 12, "mac2clk-gate", "mac", 0 }, /* MAC2 */
> + [ASPEED_CLK_GATE_RSACLK] = { 24, -1, "rsaclk-gate", NULL, 0 }, /* RSA */
> + [ASPEED_CLK_GATE_UART3CLK] = { 25, -1, "uart3clk-gate", "uart", 0 }, /* UART3 */
> + [ASPEED_CLK_GATE_UART4CLK] = { 26, -1, "uart4clk-gate", "uart", 0 }, /* UART4 */
> + [ASPEED_CLK_GATE_SDCLKCLK] = { 27, 16, "sdclk-gate", NULL, 0 }, /* SDIO/SD */
> + [ASPEED_CLK_GATE_LHCCLK] = { 28, -1, "lhclk-gate", "lhclk", 0 }, /* LPC master/LPC+ */
> +};
> +
> +static void __init aspeed_cc_init(struct device_node *np)
> +{
> + struct regmap *map;
> + u32 val;
> + int ret;
> + int i;
> +
> + scu_base = of_iomap(np, 0);
> + if (IS_ERR(scu_base))
> + return;
> +
> + aspeed_clk_data = kzalloc(sizeof(*aspeed_clk_data) +
> + sizeof(*aspeed_clk_data->hws) * ASPEED_NUM_CLKS,
> + GFP_KERNEL);
> + if (!aspeed_clk_data)
> + return;
> +
> + /*
> + ?* This way all clocks fetched before the platform device probes,
> + ?* except those we assign here for early use, will be deferred.
> + ?*/
> + for (i = 0; i < ASPEED_NUM_CLKS; i++)
> + aspeed_clk_data->hws[i] = ERR_PTR(-EPROBE_DEFER);
> +
> + map = syscon_node_to_regmap(np);
> + if (IS_ERR(map)) {
> + pr_err("no syscon regmap\n");
> + return;
> + }
> + /*
> + ?* We check that the regmap works on this very first access,
> + ?* but as this is an MMIO-backed regmap, subsequent regmap
> + ?* access is not going to fail and we skip error checks from
> + ?* this point.
> + ?*/
> + ret = regmap_read(map, ASPEED_STRAP, &val);
> + if (ret) {
> + pr_err("failed to read strapping register\n");
> + return;
> + }
> +
> + aspeed_clk_data->num = ASPEED_NUM_CLKS;
> + ret = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, aspeed_clk_data);
> + if (ret)
> + pr_err("failed to add DT provider: %d\n", ret);
> +};
> +CLK_OF_DECLARE_DRIVER(aspeed_cc_g5, "aspeed,ast2500-scu", aspeed_cc_init);
> +CLK_OF_DECLARE_DRIVER(aspeed_cc_g4, "aspeed,ast2400-scu", aspeed_cc_init);
> diff --git a/include/dt-bindings/clock/aspeed-clock.h b/include/dt-bindings/clock/aspeed-clock.h
> new file mode 100644
> index 000000000000..4a99421d77c8
> --- /dev/null
> +++ b/include/dt-bindings/clock/aspeed-clock.h
> @@ -0,0 +1,42 @@
> +#ifndef DT_BINDINGS_ASPEED_CLOCK_H
> +#define DT_BINDINGS_ASPEED_CLOCK_H
> +
> +#define ASPEED_CLK_GATE_ECLK 0
> +#define ASPEED_CLK_GATE_GCLK 1
> +#define ASPEED_CLK_GATE_MCLK 2
> +#define ASPEED_CLK_GATE_VCLK 3
> +#define ASPEED_CLK_GATE_BCLK 4
> +#define ASPEED_CLK_GATE_DCLK 5
> +#define ASPEED_CLK_GATE_REFCLK 6
> +#define ASPEED_CLK_GATE_USBPORT2CLK 7
> +#define ASPEED_CLK_GATE_LCLK 8
> +#define ASPEED_CLK_GATE_USBUHCICLK 9
> +#define ASPEED_CLK_GATE_D1CLK 10
> +#define ASPEED_CLK_GATE_YCLK 11
> +#define ASPEED_CLK_GATE_USBPORT1CLK 12
> +#define ASPEED_CLK_GATE_UART1CLK 13
> +#define ASPEED_CLK_GATE_UART2CLK 14
> +#define ASPEED_CLK_GATE_UART5CLK 15
> +#define ASPEED_CLK_GATE_ESPICLK 16
> +#define ASPEED_CLK_GATE_MAC1CLK 17
> +#define ASPEED_CLK_GATE_MAC2CLK 18
> +#define ASPEED_CLK_GATE_RSACLK 19
> +#define ASPEED_CLK_GATE_UART3CLK 20
> +#define ASPEED_CLK_GATE_UART4CLK 21
> +#define ASPEED_CLK_GATE_SDCLKCLK 22
> +#define ASPEED_CLK_GATE_LHCCLK 23
> +#define ASPEED_CLK_HPLL 24
> +#define ASPEED_CLK_AHB 25
> +#define ASPEED_CLK_APB 26
> +#define ASPEED_CLK_UART 27
> +#define ASPEED_CLK_SDIO 28
> +#define ASPEED_CLK_ECLK 29
> +#define ASPEED_CLK_ECLK_MUX 30
> +#define ASPEED_CLK_LHCLK 31
> +#define ASPEED_CLK_MAC 32
> +#define ASPEED_CLK_BCLK 33
> +#define ASPEED_CLK_MPLL 34
> +
> +#define ASPEED_NUM_CLKS 35
> +
> +#endif
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20171005/9e67fbdd/attachment-0001.sig>
^ permalink raw reply
* Re: [PATCH v4 1/5] clk: Add clock driver for ASPEED BMC SoCs
From: Andrew Jeffery @ 2017-10-05 6:36 UTC (permalink / raw)
To: Joel Stanley, Lee Jones, Michael Turquette, Stephen Boyd
Cc: linux-kernel, linux-clk, linux-arm-kernel, Benjamin Herrenschmidt,
Jeremy Kerr, Rick Altherr, Ryan Chen, Arnd Bergmann
In-Reply-To: <20171003065540.11722-2-joel@jms.id.au>
[-- Attachment #1: Type: text/plain, Size: 10622 bytes --]
On Tue, 2017-10-03 at 17:25 +1030, Joel Stanley wrote:
> This adds the stub of a driver for the ASPEED SoCs. The clocks are
> defined and the static registration is set up.
>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
With respect to use of the Aspeed hardware,
Reviewed-by: Andrew Jeffery <andrew@aj.id.au>
> ---
> v3:
> - use named initlisers for aspeed_gates table
> - fix clocks typo
> - Move ASPEED_NUM_CLKS to the bottom of the list
> - Put gates at the start of the list, so we can use them to initalise
> the aspeed_gates table
> - Add ASPEED_CLK_SELECTION_2
> - Set parent of network MAC gates
> ---
> drivers/clk/Kconfig | 12 +++
> drivers/clk/Makefile | 1 +
> drivers/clk/clk-aspeed.c | 148 +++++++++++++++++++++++++++++++
> include/dt-bindings/clock/aspeed-clock.h | 42 +++++++++
> 4 files changed, 203 insertions(+)
> create mode 100644 drivers/clk/clk-aspeed.c
> create mode 100644 include/dt-bindings/clock/aspeed-clock.h
>
> diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
> index 1c4e1aa6767e..9abe063ef8d2 100644
> --- a/drivers/clk/Kconfig
> +++ b/drivers/clk/Kconfig
> @@ -142,6 +142,18 @@ config COMMON_CLK_GEMINI
> This driver supports the SoC clocks on the Cortina Systems Gemini
> platform, also known as SL3516 or CS3516.
>
> +config COMMON_CLK_ASPEED
> + bool "Clock driver for Aspeed BMC SoCs"
> + depends on ARCH_ASPEED || COMPILE_TEST
> + default ARCH_ASPEED
> + select MFD_SYSCON
> + select RESET_CONTROLLER
> + ---help---
> + This driver supports the SoC clocks on the Aspeed BMC platforms.
> +
> + The G4 and G5 series, including the ast2400 and ast2500, are supported
> + by this driver.
> +
> config COMMON_CLK_S2MPS11
> tristate "Clock driver for S2MPS1X/S5M8767 MFD"
> depends on MFD_SEC_CORE || COMPILE_TEST
> diff --git a/drivers/clk/Makefile b/drivers/clk/Makefile
> index c99f363826f0..575c68919d9b 100644
> --- a/drivers/clk/Makefile
> +++ b/drivers/clk/Makefile
> @@ -26,6 +26,7 @@ obj-$(CONFIG_ARCH_CLPS711X) += clk-clps711x.o
> obj-$(CONFIG_COMMON_CLK_CS2000_CP) += clk-cs2000-cp.o
> obj-$(CONFIG_ARCH_EFM32) += clk-efm32gg.o
> obj-$(CONFIG_COMMON_CLK_GEMINI) += clk-gemini.o
> +obj-$(CONFIG_COMMON_CLK_ASPEED) += clk-aspeed.o
> obj-$(CONFIG_ARCH_HIGHBANK) += clk-highbank.o
> obj-$(CONFIG_CLK_HSDK) += clk-hsdk-pll.o
> obj-$(CONFIG_COMMON_CLK_MAX77686) += clk-max77686.o
> diff --git a/drivers/clk/clk-aspeed.c b/drivers/clk/clk-aspeed.c
> new file mode 100644
> index 000000000000..a45eb351bb05
> --- /dev/null
> +++ b/drivers/clk/clk-aspeed.c
> @@ -0,0 +1,148 @@
> +/*
> + * Copyright 2017 IBM Corporation
> + *
> + * Joel Stanley <joel@jms.id.au>
> + *
> + * This program is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU General Public License
> + * as published by the Free Software Foundation; either version
> + * 2 of the License, or (at your option) any later version.
> + */
> +
> +#define pr_fmt(fmt) "clk-aspeed: " fmt
> +
> +#include <linux/clk-provider.h>
> +#include <linux/mfd/syscon.h>
> +#include <linux/of_address.h>
> +#include <linux/regmap.h>
> +#include <linux/slab.h>
> +#include <linux/spinlock.h>
> +
> +#include <dt-bindings/clock/aspeed-clock.h>
> +
> +#define ASPEED_STRAP 0x70
> +
> +/* Keeps track of all clocks */
> +static struct clk_hw_onecell_data *aspeed_clk_data;
> +
> +static void __iomem *scu_base;
> +
> +/**
> + * struct aspeed_gate_data - Aspeed gated clocks
> + * @clock_idx: bit used to gate this clock in the clock register
> + * @reset_idx: bit used to reset this IP in the reset register. -1 if no
> + * reset is required when enabling the clock
> + * @name: the clock name
> + * @parent_name: the name of the parent clock
> + * @flags: standard clock framework flags
> + */
> +struct aspeed_gate_data {
> + u8 clock_idx;
> + s8 reset_idx;
> + const char *name;
> + const char *parent_name;
> + unsigned long flags;
> +};
> +
> +/**
> + * struct aspeed_clk_gate - Aspeed specific clk_gate structure
> + * @hw: handle between common and hardware-specific interfaces
> + * @reg: register controlling gate
> + * @clock_idx: bit used to gate this clock in the clock register
> + * @reset_idx: bit used to reset this IP in the reset register. -1 if no
> + * reset is required when enabling the clock
> + * @flags: hardware-specific flags
> + * @lock: register lock
> + *
> + * Some of the clocks in the Aspeed SoC must be put in reset before enabling.
> + * This modified version of clk_gate allows an optional reset bit to be
> + * specified.
> + */
> +struct aspeed_clk_gate {
> + struct clk_hw hw;
> + struct regmap *map;
> + u8 clock_idx;
> + s8 reset_idx;
> + u8 flags;
> + spinlock_t *lock;
> +};
> +
> +#define to_aspeed_clk_gate(_hw) container_of(_hw, struct aspeed_clk_gate, hw)
> +
> +/* TODO: ask Aspeed about the actual parent data */
> +static const struct aspeed_gate_data aspeed_gates[] __initconst = {
> + /* clk rst name parent flags */
> + [ASPEED_CLK_GATE_ECLK] = { 0, -1, "eclk-gate", "eclk", 0 }, /* Video Engine */
> + [ASPEED_CLK_GATE_GCLK] = { 1, 7, "gclk-gate", NULL, 0 }, /* 2D engine */
> + [ASPEED_CLK_GATE_MCLK] = { 2, -1, "mclk-gate", "mpll", CLK_IS_CRITICAL }, /* SDRAM */
> + [ASPEED_CLK_GATE_VCLK] = { 3, 6, "vclk-gate", NULL, 0 }, /* Video Capture */
> + [ASPEED_CLK_GATE_BCLK] = { 4, 10, "bclk-gate", "bclk", 0 }, /* PCIe/PCI */
> + [ASPEED_CLK_GATE_DCLK] = { 5, -1, "dclk-gate", NULL, 0 }, /* DAC */
> + [ASPEED_CLK_GATE_REFCLK] = { 6, -1, "refclk-gate", "clkin", CLK_IS_CRITICAL },
> + [ASPEED_CLK_GATE_USBPORT2CLK] = { 7, 3, "usb-port2-gate", NULL, 0 }, /* USB2.0 Host port 2 */
> + [ASPEED_CLK_GATE_LCLK] = { 8, 5, "lclk-gate", NULL, 0 }, /* LPC */
> + [ASPEED_CLK_GATE_USBUHCICLK] = { 9, 15, "usb-uhci-gate", NULL, 0 }, /* USB1.1 (requires port 2 enabled) */
> + [ASPEED_CLK_GATE_D1CLK] = { 10, 13, "d1clk-gate", NULL, 0 }, /* GFX CRT */
> + [ASPEED_CLK_GATE_YCLK] = { 13, 4, "yclk-gate", NULL, 0 }, /* HAC */
> + [ASPEED_CLK_GATE_USBPORT1CLK] = { 14, 14, "usb-port1-gate", NULL, 0 }, /* USB2 hub/USB2 host port 1/USB1.1 dev */
> + [ASPEED_CLK_GATE_UART1CLK] = { 15, -1, "uart1clk-gate", "uart", 0 }, /* UART1 */
> + [ASPEED_CLK_GATE_UART2CLK] = { 16, -1, "uart2clk-gate", "uart", 0 }, /* UART2 */
> + [ASPEED_CLK_GATE_UART5CLK] = { 17, -1, "uart5clk-gate", "uart", 0 }, /* UART5 */
> + [ASPEED_CLK_GATE_ESPICLK] = { 19, -1, "espiclk-gate", NULL, 0 }, /* eSPI */
> + [ASPEED_CLK_GATE_MAC1CLK] = { 20, 11, "mac1clk-gate", "mac", 0 }, /* MAC1 */
> + [ASPEED_CLK_GATE_MAC2CLK] = { 21, 12, "mac2clk-gate", "mac", 0 }, /* MAC2 */
> + [ASPEED_CLK_GATE_RSACLK] = { 24, -1, "rsaclk-gate", NULL, 0 }, /* RSA */
> + [ASPEED_CLK_GATE_UART3CLK] = { 25, -1, "uart3clk-gate", "uart", 0 }, /* UART3 */
> + [ASPEED_CLK_GATE_UART4CLK] = { 26, -1, "uart4clk-gate", "uart", 0 }, /* UART4 */
> + [ASPEED_CLK_GATE_SDCLKCLK] = { 27, 16, "sdclk-gate", NULL, 0 }, /* SDIO/SD */
> + [ASPEED_CLK_GATE_LHCCLK] = { 28, -1, "lhclk-gate", "lhclk", 0 }, /* LPC master/LPC+ */
> +};
> +
> +static void __init aspeed_cc_init(struct device_node *np)
> +{
> + struct regmap *map;
> + u32 val;
> + int ret;
> + int i;
> +
> + scu_base = of_iomap(np, 0);
> + if (IS_ERR(scu_base))
> + return;
> +
> + aspeed_clk_data = kzalloc(sizeof(*aspeed_clk_data) +
> + sizeof(*aspeed_clk_data->hws) * ASPEED_NUM_CLKS,
> + GFP_KERNEL);
> + if (!aspeed_clk_data)
> + return;
> +
> + /*
> + * This way all clocks fetched before the platform device probes,
> + * except those we assign here for early use, will be deferred.
> + */
> + for (i = 0; i < ASPEED_NUM_CLKS; i++)
> + aspeed_clk_data->hws[i] = ERR_PTR(-EPROBE_DEFER);
> +
> + map = syscon_node_to_regmap(np);
> + if (IS_ERR(map)) {
> + pr_err("no syscon regmap\n");
> + return;
> + }
> + /*
> + * We check that the regmap works on this very first access,
> + * but as this is an MMIO-backed regmap, subsequent regmap
> + * access is not going to fail and we skip error checks from
> + * this point.
> + */
> + ret = regmap_read(map, ASPEED_STRAP, &val);
> + if (ret) {
> + pr_err("failed to read strapping register\n");
> + return;
> + }
> +
> + aspeed_clk_data->num = ASPEED_NUM_CLKS;
> + ret = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, aspeed_clk_data);
> + if (ret)
> + pr_err("failed to add DT provider: %d\n", ret);
> +};
> +CLK_OF_DECLARE_DRIVER(aspeed_cc_g5, "aspeed,ast2500-scu", aspeed_cc_init);
> +CLK_OF_DECLARE_DRIVER(aspeed_cc_g4, "aspeed,ast2400-scu", aspeed_cc_init);
> diff --git a/include/dt-bindings/clock/aspeed-clock.h b/include/dt-bindings/clock/aspeed-clock.h
> new file mode 100644
> index 000000000000..4a99421d77c8
> --- /dev/null
> +++ b/include/dt-bindings/clock/aspeed-clock.h
> @@ -0,0 +1,42 @@
> +#ifndef DT_BINDINGS_ASPEED_CLOCK_H
> +#define DT_BINDINGS_ASPEED_CLOCK_H
> +
> +#define ASPEED_CLK_GATE_ECLK 0
> +#define ASPEED_CLK_GATE_GCLK 1
> +#define ASPEED_CLK_GATE_MCLK 2
> +#define ASPEED_CLK_GATE_VCLK 3
> +#define ASPEED_CLK_GATE_BCLK 4
> +#define ASPEED_CLK_GATE_DCLK 5
> +#define ASPEED_CLK_GATE_REFCLK 6
> +#define ASPEED_CLK_GATE_USBPORT2CLK 7
> +#define ASPEED_CLK_GATE_LCLK 8
> +#define ASPEED_CLK_GATE_USBUHCICLK 9
> +#define ASPEED_CLK_GATE_D1CLK 10
> +#define ASPEED_CLK_GATE_YCLK 11
> +#define ASPEED_CLK_GATE_USBPORT1CLK 12
> +#define ASPEED_CLK_GATE_UART1CLK 13
> +#define ASPEED_CLK_GATE_UART2CLK 14
> +#define ASPEED_CLK_GATE_UART5CLK 15
> +#define ASPEED_CLK_GATE_ESPICLK 16
> +#define ASPEED_CLK_GATE_MAC1CLK 17
> +#define ASPEED_CLK_GATE_MAC2CLK 18
> +#define ASPEED_CLK_GATE_RSACLK 19
> +#define ASPEED_CLK_GATE_UART3CLK 20
> +#define ASPEED_CLK_GATE_UART4CLK 21
> +#define ASPEED_CLK_GATE_SDCLKCLK 22
> +#define ASPEED_CLK_GATE_LHCCLK 23
> +#define ASPEED_CLK_HPLL 24
> +#define ASPEED_CLK_AHB 25
> +#define ASPEED_CLK_APB 26
> +#define ASPEED_CLK_UART 27
> +#define ASPEED_CLK_SDIO 28
> +#define ASPEED_CLK_ECLK 29
> +#define ASPEED_CLK_ECLK_MUX 30
> +#define ASPEED_CLK_LHCLK 31
> +#define ASPEED_CLK_MAC 32
> +#define ASPEED_CLK_BCLK 33
> +#define ASPEED_CLK_MPLL 34
> +
> +#define ASPEED_NUM_CLKS 35
> +
> +#endif
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.