* Re: [PATCH 5/6] arm64: dts: Add ipq6018 SoC and CP01 board support
From: Christian Lamparter @ 2019-06-20 15:32 UTC (permalink / raw)
To: Sricharan R
Cc: Rob Herring, Stephen Boyd, Linus Walleij, agross, devicetree,
linux-kernel, linux-clk, open list:GPIO SUBSYSTEM, linux-arm-msm,
linux-soc, linux-arm Mailing List,
Павел
In-Reply-To: <96fd8992-e333-6b3b-15c0-2845984120aa@codeaurora.org>
Hello Sricharan,
On Wednesday, June 19, 2019 4:42:11 PM CEST Sricharan R wrote:
> On 6/15/2019 2:11 AM, Christian Lamparter wrote:
> > On Wednesday, June 12, 2019 11:48:48 AM CEST Sricharan R wrote:
> >> Hi Christian,
> >>
> >> On 6/10/2019 5:45 PM, Christian Lamparter wrote:
> >>> On Monday, June 10, 2019 12:09:56 PM CEST Sricharan R wrote:
> >>>> Hi Christian,
> >>>>
> >>>> On 6/6/2019 2:11 AM, Christian Lamparter wrote:
> >>>>> On Wed, Jun 5, 2019 at 7:16 PM Sricharan R <sricharan@codeaurora.org> wrote:
> >>>>>>
> >>>>>> Add initial device tree support for the Qualcomm IPQ6018 SoC and
> >>>>>> CP01 evaluation board.
> >>>>>>
> >>>>>> Signed-off-by: Sricharan R <sricharan@codeaurora.org>
> >>>>>> Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
> >>>>>> --- /dev/null
> >>>>>> +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
> >>>>>>
> >>>>>> + clocks {
> >>>>>> + sleep_clk: sleep_clk {
> >>>>>> + compatible = "fixed-clock";
> >>>>>> + clock-frequency = <32000>;
> >>>>>> + #clock-cells = <0>;
> >>>>>> + };
> >>>>>> +
> >>>>> Recently-ish, we ran into an issue with the clock-frequency of the sleep_clk
> >>>>> on older IPQ40XX (and IPQ806x) on the OpenWrt Github and ML.
> >>>>> From what I know, the external "32KHz" crystals have 32768 Hz, but the QSDK
> >>>>> declares them at 32000 Hz. Since you probably have access to the BOM and
> >>>>> datasheets. Can you please confirm what's the real clock frequency for
> >>>>> the IPQ6018.
> >>>>> (And maybe also for the sleep_clk of the IPQ4018 as well?).
> >>>>>
> >>>>
> >>>> What exactly is the issue that you faced ?
> >>>> Looking in to the docs, it is <32000> only on ipq6018 and ipq40xx as well.
> >>>
> >>> We need just a confirmation.
> >>>
> >>> Then again, Currently the qcom-ipq4019.dtsi is using 32768 Hz.
> >>>
> >>> | sleep_clk: sleep_clk {
> >>> | compatible = "fixed-clock";
> >>> | clock-frequency = <32768>;
> >>> | #clock-cells = <0>;
> >>> | };
> >>>
> >>> <https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/qcom-ipq4019.dtsi#L144>
> >>>
> >>> Which makes sense, because all previous Qualcomm Atheros MIPS and the
> >>> future IPQ8072 SoCs have been either using or deriving a 32768 Hz clock.
> >>>
> >>> For example: The AR9344 derives the clock from the 25MHz/40MHz external
> >>> oscillator. This is explained in "8.16.9 Derived RTC Clock (DERIVED_RTC_CLK)".
> >>> Which mentions that the "32KHz" clock interval is 30.5 usec / 30.48 usec
> >>> depending whenever the external reference crystal has 40MHz or 25MHz.
> >>> (1/30.5usec = 32.7868852 kilohertz!). The QCA9558 datasheet says the same
> >>> in "10.19.11 Derived RTC Clock".
> >>>
> >>> For IPQ8072: I point to the post by Sven Eckelmann on the OpenWrt ML:
> >>> <http://lists.infradead.org/pipermail/openwrt-devel/2019-May/017131.html>
> >>> "I was only able to verify for IPQ8072 that it had a 32.768 KHz
> >>> sleep clock."
> >>>
> >>> So this is pretty much "why there is an issue", it's confusing.
> >>> Is possible can you please look if there are (fixed) divisors values
> >>> listed in the documentation or the registers and bits that the values
> >>> are stored in? Because then we could just calculate it.
> >>>
> >>
> >> Really sorry for the confusion. So looking little more, SLEEP_CLK is derived
> >> from an external 38.4MHZ crystal, it is 32.768 KHZ.
> > That's really valuable information to have. Thank you!
> >
> >> Somehow the clk freq plan etc seems to mention them only as .032 MHZ and misses
> >> out. That means i will correct the patch for 32768 and probably the
> >> ipq8074.dtsi as well
> >
> > Ok, there's one more issue that Paul found (at least with the IPQ4019),
> > https://patchwork.ozlabs.org/patch/1099482
> >
> > it seems that the "sleep_clk" node in the qcom-ipq4019.dtsi is not used by
> > the gcc-ipq4019.c clk driver. this causes both wifi rtc_clks and the usb sleep
> > clks to dangle in the /sys/kernel/debug/clk/clk_summary (from a RT-AC58U)
> >
> > clock enable_cnt prepare_cnt rate accuracy phase
> > ----------------------------------------------------------------------------------------
> > xo 9 9 48000000 0 0
> > [...]
> > sleep_clk 1 1 32768 0 0
> > gcc_wcss5g_rtc_clk 1 1 0 0 0
> > gcc_wcss2g_rtc_clk 1 1 0 0 0
> > gcc_usb3_sleep_clk 1 1 0 0 0
> > gcc_usb2_sleep_clk 1 1 0 0 0
> >
> > with his patch the /sys/kernel/debug/clk/clk_summary looks "better"
> >
> > (something like this:)
> >
> > clock enable_cnt prepare_cnt rate accuracy phase
> > ----------------------------------------------------------------------------------------
> > xo 9 9 48000000 0 0
> > [...]
> > gcc_sleep_clk_src 5 5 32000 0 0
> > gcc_wcss5g_rtc_clk 1 1 32000 0 0
> > gcc_wcss2g_rtc_clk 1 1 32000 0 0
> > gcc_usb3_sleep_clk 1 1 32000 0 0
> > gcc_usb2_sleep_clk 1 1 32000 0 0
> >
> > but judging from your comment "SLEEP_CLK is derived from an
> > external 38.4MHZ crystal" the gcc_sleep_clk_src / sleep_clk
> > should have xo as the parent. so the ideal output should be:
> >
> > clock enable_cnt prepare_cnt rate accuracy phase
> > ----------------------------------------------------------------------------------------
> > xo 10 10 48000000 0 0
> > [...]
> > gcc_sleep_clk 5 5 32768 0 0
> > gcc_wcss5g_rtc_clk 1 1 32768 0 0
> > gcc_wcss2g_rtc_clk 1 1 32768 0 0
> > gcc_usb3_sleep_clk 1 1 32768 0 0
> > gcc_usb2_sleep_clk 1 1 32768 0 0
> >
> > or am I missing/skipping over something important?
> >
>
> Sorry for the delayed response. So what i said above (32768 clk) looks
> like true only for ipq8074. For ipq4019, looks like 32000.
>
> That means, there is still some thing unclear. I am checking for precise
> information from HW team for ipq4019/8074/6018. Please hang on, will
> update you asap.
Thank you for looking this up! I'll definitely stick around for the final
verdict.
Also, I think the "xo" clk of your IPQ6018 dts should get the
"always-on;" property (any maybe sleep_clk as well?).
Paul discovered that the QSDK had this extra commit
<https://lore.kernel.org/patchwork/patch/1089385/>
(Maybe the changeid can help you look it up internally)
For IPQ4019, this enables the high resolution with a 1ns resolution
instead of 10ms.
(echo q > /proc/sysrq-trigger can be used to check this just look for
the "resolution" value before and after.)
Cheers,
Christian
^ permalink raw reply
* Re: [PATCH 5/6] arm64: dts: Add ipq6018 SoC and CP01 board support
From: Christian Lamparter @ 2019-06-20 15:32 UTC (permalink / raw)
To: Sricharan R
Cc: devicetree, Stephen Boyd, linux-arm-msm, Linus Walleij, agross,
linux-kernel, Павел,
open list:GPIO SUBSYSTEM, Rob Herring, linux-soc, linux-clk,
linux-arm Mailing List
In-Reply-To: <96fd8992-e333-6b3b-15c0-2845984120aa@codeaurora.org>
Hello Sricharan,
On Wednesday, June 19, 2019 4:42:11 PM CEST Sricharan R wrote:
> On 6/15/2019 2:11 AM, Christian Lamparter wrote:
> > On Wednesday, June 12, 2019 11:48:48 AM CEST Sricharan R wrote:
> >> Hi Christian,
> >>
> >> On 6/10/2019 5:45 PM, Christian Lamparter wrote:
> >>> On Monday, June 10, 2019 12:09:56 PM CEST Sricharan R wrote:
> >>>> Hi Christian,
> >>>>
> >>>> On 6/6/2019 2:11 AM, Christian Lamparter wrote:
> >>>>> On Wed, Jun 5, 2019 at 7:16 PM Sricharan R <sricharan@codeaurora.org> wrote:
> >>>>>>
> >>>>>> Add initial device tree support for the Qualcomm IPQ6018 SoC and
> >>>>>> CP01 evaluation board.
> >>>>>>
> >>>>>> Signed-off-by: Sricharan R <sricharan@codeaurora.org>
> >>>>>> Signed-off-by: Abhishek Sahu <absahu@codeaurora.org>
> >>>>>> --- /dev/null
> >>>>>> +++ b/arch/arm64/boot/dts/qcom/ipq6018.dtsi
> >>>>>>
> >>>>>> + clocks {
> >>>>>> + sleep_clk: sleep_clk {
> >>>>>> + compatible = "fixed-clock";
> >>>>>> + clock-frequency = <32000>;
> >>>>>> + #clock-cells = <0>;
> >>>>>> + };
> >>>>>> +
> >>>>> Recently-ish, we ran into an issue with the clock-frequency of the sleep_clk
> >>>>> on older IPQ40XX (and IPQ806x) on the OpenWrt Github and ML.
> >>>>> From what I know, the external "32KHz" crystals have 32768 Hz, but the QSDK
> >>>>> declares them at 32000 Hz. Since you probably have access to the BOM and
> >>>>> datasheets. Can you please confirm what's the real clock frequency for
> >>>>> the IPQ6018.
> >>>>> (And maybe also for the sleep_clk of the IPQ4018 as well?).
> >>>>>
> >>>>
> >>>> What exactly is the issue that you faced ?
> >>>> Looking in to the docs, it is <32000> only on ipq6018 and ipq40xx as well.
> >>>
> >>> We need just a confirmation.
> >>>
> >>> Then again, Currently the qcom-ipq4019.dtsi is using 32768 Hz.
> >>>
> >>> | sleep_clk: sleep_clk {
> >>> | compatible = "fixed-clock";
> >>> | clock-frequency = <32768>;
> >>> | #clock-cells = <0>;
> >>> | };
> >>>
> >>> <https://github.com/torvalds/linux/blob/master/arch/arm/boot/dts/qcom-ipq4019.dtsi#L144>
> >>>
> >>> Which makes sense, because all previous Qualcomm Atheros MIPS and the
> >>> future IPQ8072 SoCs have been either using or deriving a 32768 Hz clock.
> >>>
> >>> For example: The AR9344 derives the clock from the 25MHz/40MHz external
> >>> oscillator. This is explained in "8.16.9 Derived RTC Clock (DERIVED_RTC_CLK)".
> >>> Which mentions that the "32KHz" clock interval is 30.5 usec / 30.48 usec
> >>> depending whenever the external reference crystal has 40MHz or 25MHz.
> >>> (1/30.5usec = 32.7868852 kilohertz!). The QCA9558 datasheet says the same
> >>> in "10.19.11 Derived RTC Clock".
> >>>
> >>> For IPQ8072: I point to the post by Sven Eckelmann on the OpenWrt ML:
> >>> <http://lists.infradead.org/pipermail/openwrt-devel/2019-May/017131.html>
> >>> "I was only able to verify for IPQ8072 that it had a 32.768 KHz
> >>> sleep clock."
> >>>
> >>> So this is pretty much "why there is an issue", it's confusing.
> >>> Is possible can you please look if there are (fixed) divisors values
> >>> listed in the documentation or the registers and bits that the values
> >>> are stored in? Because then we could just calculate it.
> >>>
> >>
> >> Really sorry for the confusion. So looking little more, SLEEP_CLK is derived
> >> from an external 38.4MHZ crystal, it is 32.768 KHZ.
> > That's really valuable information to have. Thank you!
> >
> >> Somehow the clk freq plan etc seems to mention them only as .032 MHZ and misses
> >> out. That means i will correct the patch for 32768 and probably the
> >> ipq8074.dtsi as well
> >
> > Ok, there's one more issue that Paul found (at least with the IPQ4019),
> > https://patchwork.ozlabs.org/patch/1099482
> >
> > it seems that the "sleep_clk" node in the qcom-ipq4019.dtsi is not used by
> > the gcc-ipq4019.c clk driver. this causes both wifi rtc_clks and the usb sleep
> > clks to dangle in the /sys/kernel/debug/clk/clk_summary (from a RT-AC58U)
> >
> > clock enable_cnt prepare_cnt rate accuracy phase
> > ----------------------------------------------------------------------------------------
> > xo 9 9 48000000 0 0
> > [...]
> > sleep_clk 1 1 32768 0 0
> > gcc_wcss5g_rtc_clk 1 1 0 0 0
> > gcc_wcss2g_rtc_clk 1 1 0 0 0
> > gcc_usb3_sleep_clk 1 1 0 0 0
> > gcc_usb2_sleep_clk 1 1 0 0 0
> >
> > with his patch the /sys/kernel/debug/clk/clk_summary looks "better"
> >
> > (something like this:)
> >
> > clock enable_cnt prepare_cnt rate accuracy phase
> > ----------------------------------------------------------------------------------------
> > xo 9 9 48000000 0 0
> > [...]
> > gcc_sleep_clk_src 5 5 32000 0 0
> > gcc_wcss5g_rtc_clk 1 1 32000 0 0
> > gcc_wcss2g_rtc_clk 1 1 32000 0 0
> > gcc_usb3_sleep_clk 1 1 32000 0 0
> > gcc_usb2_sleep_clk 1 1 32000 0 0
> >
> > but judging from your comment "SLEEP_CLK is derived from an
> > external 38.4MHZ crystal" the gcc_sleep_clk_src / sleep_clk
> > should have xo as the parent. so the ideal output should be:
> >
> > clock enable_cnt prepare_cnt rate accuracy phase
> > ----------------------------------------------------------------------------------------
> > xo 10 10 48000000 0 0
> > [...]
> > gcc_sleep_clk 5 5 32768 0 0
> > gcc_wcss5g_rtc_clk 1 1 32768 0 0
> > gcc_wcss2g_rtc_clk 1 1 32768 0 0
> > gcc_usb3_sleep_clk 1 1 32768 0 0
> > gcc_usb2_sleep_clk 1 1 32768 0 0
> >
> > or am I missing/skipping over something important?
> >
>
> Sorry for the delayed response. So what i said above (32768 clk) looks
> like true only for ipq8074. For ipq4019, looks like 32000.
>
> That means, there is still some thing unclear. I am checking for precise
> information from HW team for ipq4019/8074/6018. Please hang on, will
> update you asap.
Thank you for looking this up! I'll definitely stick around for the final
verdict.
Also, I think the "xo" clk of your IPQ6018 dts should get the
"always-on;" property (any maybe sleep_clk as well?).
Paul discovered that the QSDK had this extra commit
<https://lore.kernel.org/patchwork/patch/1089385/>
(Maybe the changeid can help you look it up internally)
For IPQ4019, this enables the high resolution with a 1ns resolution
instead of 10ms.
(echo q > /proc/sysrq-trigger can be used to check this just look for
the "resolution" value before and after.)
Cheers,
Christian
^ permalink raw reply
* [Qemu-devel] [PATCH 1/3] seabios: add config for ati vgabios
From: Gerd Hoffmann @ 2019-06-20 15:11 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
In-Reply-To: <20190620151104.2678-1-kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
roms/config.vga-ati | 4 ++++
1 file changed, 4 insertions(+)
create mode 100644 roms/config.vga-ati
diff --git a/roms/config.vga-ati b/roms/config.vga-ati
new file mode 100644
index 000000000000..12506b664442
--- /dev/null
+++ b/roms/config.vga-ati
@@ -0,0 +1,4 @@
+CONFIG_QEMU=y
+CONFIG_BUILD_VGABIOS=y
+CONFIG_VGA_ATI=y
+CONFIG_VGA_PCI=y
--
2.18.1
^ permalink raw reply related
* [CI v3 11/33] drm/i915: Store backpointer to intel_gt in the engine
From: Tvrtko Ursulin @ 2019-06-20 15:31 UTC (permalink / raw)
To: Intel-gfx
In-Reply-To: <20190619213437.1190-11-tvrtko.ursulin@linux.intel.com>
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
It will come useful in the next patch.
v2:
* Do mock_engine as well.
v3:
* And the virtual engine...
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/gt/intel_engine_cs.c | 1 +
drivers/gpu/drm/i915/gt/intel_engine_types.h | 2 ++
drivers/gpu/drm/i915/gt/intel_lrc.c | 1 +
drivers/gpu/drm/i915/gt/mock_engine.c | 1 +
4 files changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index c548f6d1c1a6..959ed303b5fc 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -316,6 +316,7 @@ intel_engine_setup(struct drm_i915_private *dev_priv,
engine->id = id;
engine->mask = BIT(id);
engine->i915 = dev_priv;
+ engine->gt = &dev_priv->gt;
engine->uncore = &dev_priv->uncore;
__sprint_engine_name(engine->name, info);
engine->hw_id = engine->guc_id = info->hw_id;
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_types.h b/drivers/gpu/drm/i915/gt/intel_engine_types.h
index 43e975a26016..9a734288153e 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_types.h
+++ b/drivers/gpu/drm/i915/gt/intel_engine_types.h
@@ -35,6 +35,7 @@ struct drm_i915_reg_table;
struct i915_gem_context;
struct i915_request;
struct i915_sched_attr;
+struct intel_gt;
struct intel_uncore;
typedef u8 intel_engine_mask_t;
@@ -279,6 +280,7 @@ struct intel_engine_execlists {
struct intel_engine_cs {
struct drm_i915_private *i915;
+ struct intel_gt *gt;
struct intel_uncore *uncore;
char name[INTEL_ENGINE_CS_MAX_NAME];
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 82b7ace62d97..82fe6d5f08d4 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -3290,6 +3290,7 @@ intel_execlists_create_virtual(struct i915_gem_context *ctx,
return ERR_PTR(-ENOMEM);
ve->base.i915 = ctx->i915;
+ ve->base.gt = siblings[0]->gt;
ve->base.id = -1;
ve->base.class = OTHER_CLASS;
ve->base.uabi_class = I915_ENGINE_CLASS_INVALID;
diff --git a/drivers/gpu/drm/i915/gt/mock_engine.c b/drivers/gpu/drm/i915/gt/mock_engine.c
index 486c6953dcb1..b022af3385f3 100644
--- a/drivers/gpu/drm/i915/gt/mock_engine.c
+++ b/drivers/gpu/drm/i915/gt/mock_engine.c
@@ -257,6 +257,7 @@ struct intel_engine_cs *mock_engine(struct drm_i915_private *i915,
/* minimal engine setup for requests */
engine->base.i915 = i915;
+ engine->base.gt = &i915->gt;
snprintf(engine->base.name, sizeof(engine->base.name), "%s", name);
engine->base.id = id;
engine->base.mask = BIT(id);
--
2.20.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related
* Re: [PATCH 1/2] PM / devfreq: Fix governor module load failure
From: Ezequiel Garcia @ 2019-06-20 15:31 UTC (permalink / raw)
To: Chanwoo Choi, Kyungmin Park, MyungJoo Ham
Cc: kernel, linux-pm, Enric Balletbo i Serra
In-Reply-To: <52870c3e-cbf1-d627-8e93-8e1fb8c31d48@samsung.com>
On Thu, 2019-06-20 at 17:04 +0900, Chanwoo Choi wrote:
> On 19. 6. 20. 오후 4:59, Chanwoo Choi wrote:
> > Hi,
> >
> > On 19. 6. 6. 오전 4:00, Ezequiel Garcia wrote:
> > > A bit unexpectedly (but still documented), request_module may
> > > return a positive value, in case of a modprobe error.
> > > This is currently causing issues in the devfreq framework.
> > >
> > > When a request_module exits with a positive value, we currently
> > > return that via ERR_PTR. However, because the value is positive,
> > > it's not a ERR_VALUE proper, and is therefore treated as a
> > > valid struct devfreq_governor pointer, leading to a kernel oops.
> > >
> > > The right way to fix this is hinted in __request_module documentation:
> > >
> > > """
> > > [snip] The function returns
> > > zero on success or a negative errno code or positive exit code from
> > > "modprobe" on failure. Note that a successful module load does not mean
> > > the module did not then unload and exit on an error of its own. Callers
> > > must check that the service they requested is now available not blindly
> > > invoke it.
> > > """
> > >
> > > Therefore, drop the return value check, which is not useful, and instead
> > > just re-try to find the (hopefully now loaded) governor.
> > >
> > > Fixes: 23c7b54ca1cd1 ("PM / devfreq: Fix devfreq_add_device() when drivers are built as modules.")
> > > Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
> > > ---
> > > drivers/devfreq/devfreq.c | 8 ++------
> > > 1 file changed, 2 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/drivers/devfreq/devfreq.c b/drivers/devfreq/devfreq.c
> > > index 6b6991f0e873..8868ad9472d2 100644
> > > --- a/drivers/devfreq/devfreq.c
> > > +++ b/drivers/devfreq/devfreq.c
> > > @@ -236,7 +236,6 @@ static struct devfreq_governor *find_devfreq_governor(const char *name)
> > > static struct devfreq_governor *try_then_request_governor(const char *name)
> > > {
> > > struct devfreq_governor *governor;
> > > - int err = 0;
> > >
> > > if (IS_ERR_OR_NULL(name)) {
> > > pr_err("DEVFREQ: %s: Invalid parameters\n", __func__);
> > > @@ -251,13 +250,10 @@ static struct devfreq_governor *try_then_request_governor(const char *name)
> > >
> > > if (!strncmp(name, DEVFREQ_GOV_SIMPLE_ONDEMAND,
> > > DEVFREQ_NAME_LEN))
> > > - err = request_module("governor_%s", "simpleondemand");
> > > + request_module("governor_%s", "simpleondemand");
> >
> > I don't agree to remove the exception handling. Even if request_module()
> > returns positive value,
>
> Sorry, I wrote the wrong comment. It have to handle the positive return value
> for exception handling.
>
OK, let me give this a new try.
Thanks,
Ezequiel
^ permalink raw reply
* Re: [PATCH v2 04/20] hw/i386/pc: Add the E820Type enum type
From: Michael S. Tsirkin @ 2019-06-20 15:31 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Marcel Apfelbaum, Richard Henderson, Rob Bradford,
Eduardo Habkost, kvm, Marcelo Tosatti, Samuel Ortiz, Yang Zhong,
Paolo Bonzini
In-Reply-To: <20190613143446.23937-5-philmd@redhat.com>
On Thu, Jun 13, 2019 at 04:34:30PM +0200, Philippe Mathieu-Daudé wrote:
> This ensure we won't use an incorrect value.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
It doesn't actually ensure anything: compiler does not check IIUC.
And OTOH it's stored in type field in struct e820_entry.
> ---
> v2: Do not cast the enum (Li)
> ---
> hw/i386/pc.c | 4 ++--
> include/hw/i386/pc.h | 16 ++++++++++------
> 2 files changed, 12 insertions(+), 8 deletions(-)
>
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 5a7cffbb1a..86ba554439 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -872,7 +872,7 @@ static void handle_a20_line_change(void *opaque, int irq, int level)
> x86_cpu_set_a20(cpu, level);
> }
>
> -ssize_t e820_add_entry(uint64_t address, uint64_t length, uint32_t type)
> +ssize_t e820_add_entry(uint64_t address, uint64_t length, E820Type type)
> {
> unsigned int index = le32_to_cpu(e820_reserve.count);
> struct e820_entry *entry;
> @@ -906,7 +906,7 @@ size_t e820_get_num_entries(void)
> return e820_entries;
> }
>
> -bool e820_get_entry(unsigned int idx, uint32_t type,
> +bool e820_get_entry(unsigned int idx, E820Type type,
> uint64_t *address, uint64_t *length)
> {
> if (idx < e820_entries && e820_table[idx].type == cpu_to_le32(type)) {
> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> index c56116e6f6..7c07185dd5 100644
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -282,12 +282,16 @@ void pc_system_firmware_init(PCMachineState *pcms, MemoryRegion *rom_memory);
> void pc_madt_cpu_entry(AcpiDeviceIf *adev, int uid,
> const CPUArchIdList *apic_ids, GArray *entry);
>
> -/* e820 types */
> -#define E820_RAM 1
> -#define E820_RESERVED 2
> -#define E820_ACPI 3
> -#define E820_NVS 4
> -#define E820_UNUSABLE 5
> +/**
> + * E820Type: Type of the e820 address range.
> + */
> +typedef enum {
> + E820_RAM = 1,
> + E820_RESERVED = 2,
> + E820_ACPI = 3,
> + E820_NVS = 4,
> + E820_UNUSABLE = 5
> +} E820Type;
>
> ssize_t e820_add_entry(uint64_t, uint64_t, uint32_t);
> size_t e820_get_num_entries(void);
> --
> 2.20.1
^ permalink raw reply
* Re: [PATCH] Btrfs: add missing inode version, ctime and mtime updates when punching hole
From: David Sterba @ 2019-06-20 15:30 UTC (permalink / raw)
To: fdmanana; +Cc: linux-btrfs
In-Reply-To: <20190619120550.9825-1-fdmanana@kernel.org>
On Wed, Jun 19, 2019 at 01:05:50PM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> If the range for which we are punching a hole covers only part of a page,
> we end up updating the inode item but we skip the update of the inode's
> iversion, mtime and ctime. Fix that by ensuring we update those properties
> of the inode.
>
> A patch for fstests test case generic/059 that tests this as been sent
> along with this fix.
>
> Fixes: 2aaa66558172b0 ("Btrfs: add hole punching")
> Fixes: e8c1c76e804b18 ("Btrfs: add missing inode update when punching hole")
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
Added to misc-next, thanks.
^ permalink raw reply
* Re: [PATCH] Btrfs: fix fsync not persisting dentry deletions due to inode evictions
From: David Sterba @ 2019-06-20 15:30 UTC (permalink / raw)
To: fdmanana; +Cc: linux-btrfs
In-Reply-To: <20190619120539.9775-1-fdmanana@kernel.org>
On Wed, Jun 19, 2019 at 01:05:39PM +0100, fdmanana@kernel.org wrote:
> From: Filipe Manana <fdmanana@suse.com>
>
> In order to avoid searches on a log tree when unlinking an inode, we check
> if the inode being unlinked was logged in the current transaction, as well
> as the inode of its parent directory. When any of the inodes are logged,
> we proceed to delete directory items and inode reference items from the
> log, to ensure that if a subsequent fsync of only the inode being unlinked
> or only of the parent directory when the other is not fsync'ed as well,
> does not result in the entry still existing after a power failure.
>
> That check however is not reliable when one of the inodes involved (the
> one being unlinked or its parent directory's inode) is evicted, since the
> logged_trans field is transient, that is, it is not stored on disk, so it
> is lost when the inode is evicted and loaded into memory again (which is
> set to zero on load). As a consequence the checks currently being done by
> btrfs_del_dir_entries_in_log() and btrfs_del_inode_ref_in_log() always
> return true if the inode was evicted before, regardless of the inode
> having been logged or not before (and in the current transaction), this
> results in the dentry being unlinked still existing after a log replay
> if after the unlink operation only one of the inodes involved is fsync'ed.
>
> Example:
>
> $ mkfs.btrfs -f /dev/sdb
> $ mount /dev/sdb /mnt
>
> $ mkdir /mnt/dir
> $ touch /mnt/dir/foo
> $ xfs_io -c fsync /mnt/dir/foo
>
> # Keep an open file descriptor on our directory while we evict inodes.
> # We just want to evict the file's inode, the directory's inode must not
> # be evicted.
> $ ( cd /mnt/dir; while true; do :; done ) &
> $ pid=$!
>
> # Wait a bit to give time to background process to chdir to our test
> # directory.
> $ sleep 0.5
>
> # Trigger eviction of the file's inode.
> $ echo 2 > /proc/sys/vm/drop_caches
>
> # Unlink our file and fsync the parent directory. After a power failure
> # we don't expect to see the file anymore, since we fsync'ed the parent
> # directory.
> $ rm -f $SCRATCH_MNT/dir/foo
> $ xfs_io -c fsync /mnt/dir
>
> <power failure>
>
> $ mount /dev/sdb /mnt
> $ ls /mnt/dir
> foo
> $
> --> file still there, unlink not persisted despite explicit fsync on dir
>
> Fix this by checking if the inode has the full_sync bit set in its runtime
> flags as well, since that bit is set everytime an inode is loaded from
> disk, or for other less common cases such as after a shrinking truncate
> or failure to allocate extent maps for holes, and gets cleared after the
> first fsync. Also consider the inode as possibly logged only if it was
> last modified in the current transaction (besides having the full_fsync
> flag set).
>
> Fixes: 3a5f1d458ad161 ("Btrfs: Optimize btree walking while logging inodes")
> Signed-off-by: Filipe Manana <fdmanana@suse.com>
Added to misc-next, thanks.
^ permalink raw reply
* Re: [PATCH] drm/amdgpu: early merge post fix to df_v3_6 for xgmi
From: Kuehling, Felix @ 2019-06-20 15:29 UTC (permalink / raw)
To: Alex Deucher, Kim, Jonathan
Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
In-Reply-To: <CADnq5_MRS_oT1fC45eEqJ3CTdNYc6eKuu2Fu-KTLJ3hbaUUfAw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 2019-06-20 11:28 a.m., Alex Deucher wrote:
> On Thu, Jun 20, 2019 at 11:19 AM Kim, Jonathan <Jonathan.Kim@amd.com> wrote:
>> fixed df permon to 4
>> removed unrequired ret in soc15
>> renamed df init to df sw init and moved callback from soc15 hw init to
>> soc15 sw init
>>
>> Change-Id: Ia9897612937e652e7f8a09c1d23bb1c0e6f3d8f7
>> Signed-off-by: Jonathan Kim <Jonathan.Kim@amd.com>
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +-
>> drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 4 ++--
>> drivers/gpu/drm/amd/amdgpu/soc15.c | 5 ++---
>> 3 files changed, 5 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>> index b227c956b8a9..c3ed09cd2678 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
>> @@ -732,7 +732,7 @@ struct amd_powerplay {
>> };
>>
>> #define AMDGPU_RESET_MAGIC_NUM 64
>> -#define AMDGPU_MAX_DF_PERFMONS 16
>> +#define AMDGPU_MAX_DF_PERFMONS 4
>> struct amdgpu_device {
>> struct device *dev;
>> struct drm_device *ddev;
>> diff --git a/drivers/gpu/drm/amd/amdgpu/df_v3_6.c b/drivers/gpu/drm/amd/amdgpu/df_v3_6.c
>> index 12e3e67013d9..c6514c609ae6 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/df_v3_6.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/df_v3_6.c
>> @@ -118,7 +118,7 @@ static ssize_t df_v3_6_get_df_cntr_avail(struct device *dev,
>> static DEVICE_ATTR(df_cntr_avail, S_IRUGO, df_v3_6_get_df_cntr_avail, NULL);
>>
>> /* init perfmons */
>> -static void df_v3_6_init(struct amdgpu_device *adev)
>> +static void df_v3_6_sw_init(struct amdgpu_device *adev)
>> {
>> int i, ret;
>>
>> @@ -490,7 +490,7 @@ static void df_v3_6_pmc_get_count(struct amdgpu_device *adev,
>> }
>>
>> const struct amdgpu_df_funcs df_v3_6_funcs = {
>> - .init = df_v3_6_init,
>> + .init = df_v3_6_sw_init,
> Wasn't there a fini callback as well to tear stuff down? What
> happened to that? Apologies if I missed some of the discussion, I'm
> still catching up.
The fini callback became unnecessary when we removed dynamic allocation
of memory in the init function. So it wasn't in the final version of the
patch.
Regards,
Felix
>
> Alex
>
>> .enable_broadcast_mode = df_v3_6_enable_broadcast_mode,
>> .get_fb_channel_number = df_v3_6_get_fb_channel_number,
>> .get_hbm_channel_number = df_v3_6_get_hbm_channel_number,
>> diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c
>> index 0afbcc80ea61..d1e7f623eea8 100644
>> --- a/drivers/gpu/drm/amd/amdgpu/soc15.c
>> +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
>> @@ -1034,6 +1034,8 @@ static int soc15_common_sw_init(void *handle)
>> if (amdgpu_sriov_vf(adev))
>> xgpu_ai_mailbox_add_irq_id(adev);
>>
>> + adev->df_funcs->init(adev);
>> +
>> return 0;
>> }
>>
>> @@ -1067,7 +1069,6 @@ static void soc15_doorbell_range_init(struct amdgpu_device *adev)
>> static int soc15_common_hw_init(void *handle)
>> {
>> struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>> - int ret;
>>
>> /* enable pcie gen2/3 link */
>> soc15_pcie_gen3_enable(adev);
>> @@ -1082,8 +1083,6 @@ static int soc15_common_hw_init(void *handle)
>> if (adev->nbio_funcs->remap_hdp_registers)
>> adev->nbio_funcs->remap_hdp_registers(adev);
>>
>> - adev->df_funcs->init(adev);
>> -
>> /* enable the doorbell aperture */
>> soc15_enable_doorbell_aperture(adev, true);
>> /* HW doorbell routing policy: doorbell writing not
>> --
>> 2.17.1
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply
* Re: [PATCH v2 03/20] hw/i386/pc: Let e820_add_entry() return a ssize_t type
From: Michael S. Tsirkin @ 2019-06-20 15:29 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Marcel Apfelbaum, Richard Henderson, Rob Bradford,
Eduardo Habkost, kvm, Marcelo Tosatti, Samuel Ortiz, Yang Zhong,
Paolo Bonzini, Li Qiang
In-Reply-To: <20190613143446.23937-4-philmd@redhat.com>
On Thu, Jun 13, 2019 at 04:34:29PM +0200, Philippe Mathieu-Daudé wrote:
> e820_add_entry() returns an array size on success, or a negative
> value on error.
So what's wrong with int? Does it overflow somehow?
>
> Reviewed-by: Li Qiang <liq3ea@gmail.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
> ---
> hw/i386/pc.c | 2 +-
> include/hw/i386/pc.h | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index ff0f6bbbb3..5a7cffbb1a 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -872,7 +872,7 @@ static void handle_a20_line_change(void *opaque, int irq, int level)
> x86_cpu_set_a20(cpu, level);
> }
>
> -int e820_add_entry(uint64_t address, uint64_t length, uint32_t type)
> +ssize_t e820_add_entry(uint64_t address, uint64_t length, uint32_t type)
> {
> unsigned int index = le32_to_cpu(e820_reserve.count);
> struct e820_entry *entry;
> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> index fc29893624..c56116e6f6 100644
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -289,7 +289,7 @@ void pc_madt_cpu_entry(AcpiDeviceIf *adev, int uid,
> #define E820_NVS 4
> #define E820_UNUSABLE 5
>
> -int e820_add_entry(uint64_t, uint64_t, uint32_t);
> +ssize_t e820_add_entry(uint64_t, uint64_t, uint32_t);
> size_t e820_get_num_entries(void);
> bool e820_get_entry(unsigned int, uint32_t, uint64_t *, uint64_t *);
>
> --
> 2.20.1
^ permalink raw reply
* Re: Move away from default password
From: Joseph Reynolds @ 2019-06-20 15:30 UTC (permalink / raw)
To: Carter Su(苏孝); +Cc: openbmc, openbmc
In-Reply-To: <ca82e6a6ab5440e3b9f9754a66d5452c@inspur.com>
On 2019-06-20 02:55, Carter Su wrote:
> Having a default password is a security risk, but if per BMC has an
> unique password, it may not very convenient for customer to use.
> Customers will change the default password when they install new
> machinery, or they may creat new account and password for BMC to use.
Thank you. I understand that concern. How do we balance ease of use
-versus- security?
Having a well-known default password is easy to use, but too many
installations fail to change the password, which gives attackers an easy
way to take over the system. Because of that, new laws are going into
effect, for example [CA Law SB-327][], which require the system to not
have a default password.
[CA Law SB-327]:
https://leginfo.legislature.ca.gov/faces/billTextClient.xhtml?bill_id=201720180SB327
I am looking at three options:
1. Leave the default OpenBMC configuration with the default password.
That is, if you build an OpenBMC image from source, it will have the
default password.
I wouldn't change that unless until there is a better alternative. (See
2 and 3 below.)
2. Same as option 1, but have a way to set an unique password for each
system. Specifically, the firmware image would be identical for
multiple systems, but the password would be different for each. You
could use randomly generated passwords, or a scheme that generates
password based on the system serial number or some other unique
identifier (such as a MAC address), with weaker or stronger security
considerations for each. Whoever build the BMC image and loads it onto
the BMC could change the password before giving the BMC to its end user.
As you point out, this may be very inconvenient.
3. Create a new feature: a new security mode to restrict the BMC's
operation to setting up a new account. Specifically, when this feature
is engaged, the BMC requires you to create a userid and password before
its full function can be accessed.
- Joseph
>
>
> Carter Su
>
>
> ---------- Forwarded message ---------
> From: Stewart Smith <stewart@linux.ibm.com>
> Date: Tue, Jun 18, 2019 at 6:59 AM
> Subject: Re: Move away from default password
> To: Adriana Kobylak <anoo@linux.ibm.com>, Joseph Reynolds
> <jrey@linux.ibm.com>
> Cc: openbmc <openbmc-bounces+anoo=linux.ibm.com@lists.ozlabs.org>,
> Openbmc <openbmc@lists.ozlabs.org>, Thomaiyar, Richard Marian
> <richard.marian.thomaiyar@linux.intel.com>
>
>
> Adriana Kobylak <anoo@linux.ibm.com> writes:
>>>> 1. Unique password per BMC.
>>>> In this approach, there is a way to change the factory default
>>>> password. Example flow: assemble the BMC, test it, factory reset,
>>>> generate unique password (such as `pwgen`), then use a new function
>>>> “save factory default settings” which would save the current
>>>> setting
>>>> into a new “factory settings” flash partition. After that, a
>>>> factory
>>>> reset would reset to the factory installed password, not to the
>>>> setting in the source code.
>>
>> How would this new "factory settings" flash partition be protected
>> against being modified by an unauthorized or malicious user?
>
> My guess would be it'd be protected the same way that the default
> password is today: not at all. If an attacker can write to flash, the
> only way to reset the box is to dediprog the BMC flash chip.
>
> --
> Stewart Smith
> OPAL Architect, IBM.
^ permalink raw reply
* Re: [Query] arm64: Right approach to support Image.gz file type via kexec_file_load()
From: James Morse @ 2019-06-20 15:28 UTC (permalink / raw)
To: Bhupesh Sharma
Cc: Mark Rutland, matthewgarrett, Ard Biesheuvel, Catalin Marinas,
Will Deacon, AKASHI Takahiro, Bhupesh SHARMA,
kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org
In-Reply-To: <9d54bb1e-7371-5163-69b0-0af0426ee4a0@redhat.com>
Hi Bhupesh,
On 19/06/2019 22:23, Bhupesh Sharma wrote:
> Since most distributions use 'make zinstall' rule inside 'arch/arm64/boot/Makefile' (see
> [1] for details) to install the arm64 Image.gz compressed file inside the boot destination
> directory (for e.g. /boot), currently we cannot use kexec_file_load() to load vmlinuz (or
> Image.gz):
It's not just kexec_file_load(), we don't support booting from compressed or elf image
formats either: the bootloader has to decompress any Image.gz before it can run it.
> ... kernel returns -EINVAL error value, as it is not able to locate the magic number
> =0x644d5241, which is expected in the 64-byte header of the decompressed kernel image
> I can figure out two ways to address this:
>
> 1. Add support in user-space kexec-tools (for which I have a RFC patch ready), which
> handles an 'Image.gz' being passed via kexec_file_load(), using an approach as follows:
>
> a). Copy the contents of Image.gz to a temporary file.
> b). Decompress (gunzip-decompress) the contents inside the temporary file.
> c). Pass the 'fd' of the temporary file to the kernel space. So basically the kernel space
> still gets a decompressed kernel image to load via kexec_tools
Sounds reasonable.
(I guess you need to decompress it first to know the size to pass to kexec_file_load(),
hence the intermediate copy)
> This seems to have the following pros and cons, which I can think of:
>
> Pros:
> - Changes can be handled in the user-space (kexec_tools) and no changes are required in
> kernel space for handling the unsigned/non-secure boot case.
>
> Cons:
> - One obvious issue is how to handle the signed kernel Image.gz, because signature
> verification is managed inside the kernel, so handling a signed Image.gz would require
> kernel intervention eventually.
How do you sign an Image.gz? Isn't the signature written into the PE header?
> - Passing decompressed image from user-space requires the kernel to read large amount of
> data from the user-space.
The kernel can't decompress itself, so this large amount of data has to be moved at some
point.
> 2. Add support in kernel (for which I have a RFC patch ready), which handles an 'Image.gz'
> being passed via kexec_file_load(), using an approach as follows:
>
> a). Define a 'arch_kexec_kernel_image_probe' for arm64, which overrides the __weak
> definition in 'kernel/kexec_file.c'
> b). Inside 'arch_kexec_kernel_image_probe' for arm64, check if we have been passed a
> magic header 0x1f, 0x8b (\037 \213) which indicates a 'gzip format' Image file.
> b). Decompress the contents inside a buffer using a decompress_kernel() -> gunzip() ->
> inflate() logic.
>
> This seems to have the following pros and cons, which I can think of:
>
> Pros:
> - Handling signed Image.gz becomes easier in the kernel itself.
I don't follow: you can't boot this, so why would you sign it?
> Cons:
> - One needs to add a decompress_kernel() -> gunzip() -> inflate() kind-of logic in kernel
> space to handle gzipp'ed image for arm64.
We support gzipped initramfs so the code already exists. More of a problem is kdump (which
we don't yet support), which has to fit in the reserved crashkernel region, and we won't
know the size of the compressed image until we've decompressed it. (its just fiddly)
> So, I was wondering which approach should be more suitable - fixing this in user-space v/s
> fix this in kernel-space.
As user-space can do this, I think it should!
Thanks,
James
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v2 02/20] hw/i386/pc: Use size_t type to hold/return a size of array
From: Michael S. Tsirkin @ 2019-06-20 15:28 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Marcel Apfelbaum, Richard Henderson, Rob Bradford,
Eduardo Habkost, kvm, Marcelo Tosatti, Samuel Ortiz, Yang Zhong,
Paolo Bonzini, Li Qiang
In-Reply-To: <20190613143446.23937-3-philmd@redhat.com>
On Thu, Jun 13, 2019 at 04:34:28PM +0200, Philippe Mathieu-Daudé wrote:
> Reviewed-by: Li Qiang <liq3ea@gmail.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Motivation? do you expect more than 2^31 entries?
> ---
> hw/i386/pc.c | 4 ++--
> include/hw/i386/pc.h | 2 +-
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index bb3c74f4ca..ff0f6bbbb3 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -105,7 +105,7 @@ struct e820_table {
>
> static struct e820_table e820_reserve;
> static struct e820_entry *e820_table;
> -static unsigned e820_entries;
> +static size_t e820_entries;
> struct hpet_fw_config hpet_cfg = {.count = UINT8_MAX};
>
> /* Physical Address of PVH entry point read from kernel ELF NOTE */
> @@ -901,7 +901,7 @@ int e820_add_entry(uint64_t address, uint64_t length, uint32_t type)
> return e820_entries;
> }
>
> -int e820_get_num_entries(void)
> +size_t e820_get_num_entries(void)
> {
> return e820_entries;
> }
> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> index 3b3a0d6e59..fc29893624 100644
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -290,7 +290,7 @@ void pc_madt_cpu_entry(AcpiDeviceIf *adev, int uid,
> #define E820_UNUSABLE 5
>
> int e820_add_entry(uint64_t, uint64_t, uint32_t);
> -int e820_get_num_entries(void);
> +size_t e820_get_num_entries(void);
> bool e820_get_entry(unsigned int, uint32_t, uint64_t *, uint64_t *);
>
> extern GlobalProperty pc_compat_4_0_1[];
> --
> 2.20.1
^ permalink raw reply
* Re: [Query] arm64: Right approach to support Image.gz file type via kexec_file_load()
From: James Morse @ 2019-06-20 15:28 UTC (permalink / raw)
To: Bhupesh Sharma
Cc: Mark Rutland, matthewgarrett, Ard Biesheuvel, Catalin Marinas,
Will Deacon, AKASHI Takahiro, Bhupesh SHARMA,
kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org
In-Reply-To: <9d54bb1e-7371-5163-69b0-0af0426ee4a0@redhat.com>
Hi Bhupesh,
On 19/06/2019 22:23, Bhupesh Sharma wrote:
> Since most distributions use 'make zinstall' rule inside 'arch/arm64/boot/Makefile' (see
> [1] for details) to install the arm64 Image.gz compressed file inside the boot destination
> directory (for e.g. /boot), currently we cannot use kexec_file_load() to load vmlinuz (or
> Image.gz):
It's not just kexec_file_load(), we don't support booting from compressed or elf image
formats either: the bootloader has to decompress any Image.gz before it can run it.
> ... kernel returns -EINVAL error value, as it is not able to locate the magic number
> =0x644d5241, which is expected in the 64-byte header of the decompressed kernel image
> I can figure out two ways to address this:
>
> 1. Add support in user-space kexec-tools (for which I have a RFC patch ready), which
> handles an 'Image.gz' being passed via kexec_file_load(), using an approach as follows:
>
> a). Copy the contents of Image.gz to a temporary file.
> b). Decompress (gunzip-decompress) the contents inside the temporary file.
> c). Pass the 'fd' of the temporary file to the kernel space. So basically the kernel space
> still gets a decompressed kernel image to load via kexec_tools
Sounds reasonable.
(I guess you need to decompress it first to know the size to pass to kexec_file_load(),
hence the intermediate copy)
> This seems to have the following pros and cons, which I can think of:
>
> Pros:
> - Changes can be handled in the user-space (kexec_tools) and no changes are required in
> kernel space for handling the unsigned/non-secure boot case.
>
> Cons:
> - One obvious issue is how to handle the signed kernel Image.gz, because signature
> verification is managed inside the kernel, so handling a signed Image.gz would require
> kernel intervention eventually.
How do you sign an Image.gz? Isn't the signature written into the PE header?
> - Passing decompressed image from user-space requires the kernel to read large amount of
> data from the user-space.
The kernel can't decompress itself, so this large amount of data has to be moved at some
point.
> 2. Add support in kernel (for which I have a RFC patch ready), which handles an 'Image.gz'
> being passed via kexec_file_load(), using an approach as follows:
>
> a). Define a 'arch_kexec_kernel_image_probe' for arm64, which overrides the __weak
> definition in 'kernel/kexec_file.c'
> b). Inside 'arch_kexec_kernel_image_probe' for arm64, check if we have been passed a
> magic header 0x1f, 0x8b (\037 \213) which indicates a 'gzip format' Image file.
> b). Decompress the contents inside a buffer using a decompress_kernel() -> gunzip() ->
> inflate() logic.
>
> This seems to have the following pros and cons, which I can think of:
>
> Pros:
> - Handling signed Image.gz becomes easier in the kernel itself.
I don't follow: you can't boot this, so why would you sign it?
> Cons:
> - One needs to add a decompress_kernel() -> gunzip() -> inflate() kind-of logic in kernel
> space to handle gzipp'ed image for arm64.
We support gzipped initramfs so the code already exists. More of a problem is kdump (which
we don't yet support), which has to fit in the reserved crashkernel region, and we won't
know the size of the compressed image until we've decompressed it. (its just fiddly)
> So, I was wondering which approach should be more suitable - fixing this in user-space v/s
> fix this in kernel-space.
As user-space can do this, I think it should!
Thanks,
James
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
^ permalink raw reply
* Re: [PATCH] drm/amdgpu: early merge post fix to df_v3_6 for xgmi
From: Alex Deucher @ 2019-06-20 15:28 UTC (permalink / raw)
To: Kim, Jonathan; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
In-Reply-To: <20190620151924.86234-1-jonathan.kim-5C7GfCeVMHo@public.gmane.org>
On Thu, Jun 20, 2019 at 11:19 AM Kim, Jonathan <Jonathan.Kim@amd.com> wrote:
>
> fixed df permon to 4
> removed unrequired ret in soc15
> renamed df init to df sw init and moved callback from soc15 hw init to
> soc15 sw init
>
> Change-Id: Ia9897612937e652e7f8a09c1d23bb1c0e6f3d8f7
> Signed-off-by: Jonathan Kim <Jonathan.Kim@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +-
> drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 4 ++--
> drivers/gpu/drm/amd/amdgpu/soc15.c | 5 ++---
> 3 files changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> index b227c956b8a9..c3ed09cd2678 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
> @@ -732,7 +732,7 @@ struct amd_powerplay {
> };
>
> #define AMDGPU_RESET_MAGIC_NUM 64
> -#define AMDGPU_MAX_DF_PERFMONS 16
> +#define AMDGPU_MAX_DF_PERFMONS 4
> struct amdgpu_device {
> struct device *dev;
> struct drm_device *ddev;
> diff --git a/drivers/gpu/drm/amd/amdgpu/df_v3_6.c b/drivers/gpu/drm/amd/amdgpu/df_v3_6.c
> index 12e3e67013d9..c6514c609ae6 100644
> --- a/drivers/gpu/drm/amd/amdgpu/df_v3_6.c
> +++ b/drivers/gpu/drm/amd/amdgpu/df_v3_6.c
> @@ -118,7 +118,7 @@ static ssize_t df_v3_6_get_df_cntr_avail(struct device *dev,
> static DEVICE_ATTR(df_cntr_avail, S_IRUGO, df_v3_6_get_df_cntr_avail, NULL);
>
> /* init perfmons */
> -static void df_v3_6_init(struct amdgpu_device *adev)
> +static void df_v3_6_sw_init(struct amdgpu_device *adev)
> {
> int i, ret;
>
> @@ -490,7 +490,7 @@ static void df_v3_6_pmc_get_count(struct amdgpu_device *adev,
> }
>
> const struct amdgpu_df_funcs df_v3_6_funcs = {
> - .init = df_v3_6_init,
> + .init = df_v3_6_sw_init,
Wasn't there a fini callback as well to tear stuff down? What
happened to that? Apologies if I missed some of the discussion, I'm
still catching up.
Alex
> .enable_broadcast_mode = df_v3_6_enable_broadcast_mode,
> .get_fb_channel_number = df_v3_6_get_fb_channel_number,
> .get_hbm_channel_number = df_v3_6_get_hbm_channel_number,
> diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c
> index 0afbcc80ea61..d1e7f623eea8 100644
> --- a/drivers/gpu/drm/amd/amdgpu/soc15.c
> +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c
> @@ -1034,6 +1034,8 @@ static int soc15_common_sw_init(void *handle)
> if (amdgpu_sriov_vf(adev))
> xgpu_ai_mailbox_add_irq_id(adev);
>
> + adev->df_funcs->init(adev);
> +
> return 0;
> }
>
> @@ -1067,7 +1069,6 @@ static void soc15_doorbell_range_init(struct amdgpu_device *adev)
> static int soc15_common_hw_init(void *handle)
> {
> struct amdgpu_device *adev = (struct amdgpu_device *)handle;
> - int ret;
>
> /* enable pcie gen2/3 link */
> soc15_pcie_gen3_enable(adev);
> @@ -1082,8 +1083,6 @@ static int soc15_common_hw_init(void *handle)
> if (adev->nbio_funcs->remap_hdp_registers)
> adev->nbio_funcs->remap_hdp_registers(adev);
>
> - adev->df_funcs->init(adev);
> -
> /* enable the doorbell aperture */
> soc15_enable_doorbell_aperture(adev, true);
> /* HW doorbell routing policy: doorbell writing not
> --
> 2.17.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply
* Re: [PATCH v2 01/20] hw/i386/pc: Use unsigned type to index arrays
From: Michael S. Tsirkin @ 2019-06-20 15:27 UTC (permalink / raw)
To: Philippe Mathieu-Daudé
Cc: qemu-devel, Marcel Apfelbaum, Richard Henderson, Rob Bradford,
Eduardo Habkost, kvm, Marcelo Tosatti, Samuel Ortiz, Yang Zhong,
Paolo Bonzini, Li Qiang
In-Reply-To: <20190613143446.23937-2-philmd@redhat.com>
On Thu, Jun 13, 2019 at 04:34:27PM +0200, Philippe Mathieu-Daudé wrote:
> Reviewed-by: Li Qiang <liq3ea@gmail.com>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Motivation? Is this a bugfix?
> ---
> hw/i386/pc.c | 5 +++--
> include/hw/i386/pc.h | 2 +-
> 2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index 2c5446b095..bb3c74f4ca 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -874,7 +874,7 @@ static void handle_a20_line_change(void *opaque, int irq, int level)
>
> int e820_add_entry(uint64_t address, uint64_t length, uint32_t type)
> {
> - int index = le32_to_cpu(e820_reserve.count);
> + unsigned int index = le32_to_cpu(e820_reserve.count);
> struct e820_entry *entry;
>
> if (type != E820_RAM) {
> @@ -906,7 +906,8 @@ int e820_get_num_entries(void)
> return e820_entries;
> }
>
> -bool e820_get_entry(int idx, uint32_t type, uint64_t *address, uint64_t *length)
> +bool e820_get_entry(unsigned int idx, uint32_t type,
> + uint64_t *address, uint64_t *length)
> {
> if (idx < e820_entries && e820_table[idx].type == cpu_to_le32(type)) {
> *address = le64_to_cpu(e820_table[idx].address);
> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> index a7d0b87166..3b3a0d6e59 100644
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -291,7 +291,7 @@ void pc_madt_cpu_entry(AcpiDeviceIf *adev, int uid,
>
> int e820_add_entry(uint64_t, uint64_t, uint32_t);
> int e820_get_num_entries(void);
> -bool e820_get_entry(int, uint32_t, uint64_t *, uint64_t *);
> +bool e820_get_entry(unsigned int, uint32_t, uint64_t *, uint64_t *);
>
> extern GlobalProperty pc_compat_4_0_1[];
> extern const size_t pc_compat_4_0_1_len;
> --
> 2.20.1
^ permalink raw reply
* [Qemu-devel] [Bug 1829779] Re: qemu-system-arm and qemu-system-aarch64 QMP hangs after kernel boots
From: Philippe Mathieu-Daudé @ 2019-06-20 14:55 UTC (permalink / raw)
To: qemu-devel
In-Reply-To: <155837363818.14706.8629235118425908874.malonedeb@gac.canonical.com>
** Changed in: qemu
Status: New => Confirmed
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1829779
Title:
qemu-system-arm and qemu-system-aarch64 QMP hangs after kernel boots
Status in QEMU:
Confirmed
Bug description:
After booting a Linux kernel on both arm and aarch64, the QMP sockets gets unresponsive. Initially, this was thought to be limited to "quit" commands, but it reproduced with others (such as in this
reproducer). This is a partial log output:
>>> {'execute': 'qmp_capabilities'}
<<< {'return': {}}
Booting Linux on physical CPU 0x0000000000 [0x410fd034]
Linux version 4.18.16-300.fc29.aarch64 (mockbuild@buildvm-aarch64-02.arm.fedoraproject.org) (gcc version 8.2.1 20180801 (Red Hat 8.2.1-2) (GCC)) #1 SMP Sat Oct 20 23:12:22 UTC 2018
...
Policy zone: DMA32
Kernel command line: printk.time=0 console=ttyAMA0
>>> {'execute': 'stop'}
<<< {'timestamp': {'seconds': 1558370331, 'microseconds': 470173}, 'event': 'STOP'}
<<< {'return': {}}
>>> {'execute': 'cont'}
<<< {'timestamp': {'seconds': 1558370331, 'microseconds': 470849}, 'event': 'RESUME'}
<<< {'return': {}}
>>> {'execute': 'stop'}
Sometimes it takes just the first "stop" command. Overall, I was able
to reproduce 100% of times when applied on top of
6d8e75d41c58892ccc5d4ad61c4da476684c1c83.
The reproducer test can be seen/fetched at:
- https://github.com/clebergnu/qemu/commit/c778e28c24030c4a36548b714293b319f4bf18df
And test results from Travis CI can be seen at:
- https://travis-ci.org/clebergnu/qemu/jobs/534915669
For convenience purposes, here's qemu-system-aarch64 launching and hanging on the first "stop":
- https://travis-ci.org/clebergnu/qemu/jobs/534915669#L3634
- https://travis-ci.org/clebergnu/qemu/jobs/534915669#L3664
And here's qemu-system-arm hanging the very same way:
- https://travis-ci.org/clebergnu/qemu/jobs/534915669#L3799
- https://travis-ci.org/clebergnu/qemu/jobs/534915669#L3819
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1829779/+subscriptions
^ permalink raw reply
* Re: [PATCH v2 2/2] ssh: Add interface ssh_search_dir
From: Dominick Grift @ 2019-06-20 15:27 UTC (permalink / raw)
To: Alexander Miroshnichenko; +Cc: selinux-refpolicy
In-Reply-To: <642ea6d9-97c9-4ec4-a7ed-84995a953b48@millerson.name>
[-- Attachment #1: Type: text/plain, Size: 2739 bytes --]
On Thu, Jun 20, 2019 at 06:05:57PM +0300, Alexander Miroshnichenko wrote:
> On четверг, 20 июня 2019 г. 17:50:11 MSK, Dominick Grift wrote:
> > On Thu, Jun 20, 2019 at 05:41:38PM +0300, Alexander Miroshnichenko wrote:
> > > Create interface ssh_search_dir to allow ssh_server search for keys
> > > in non-standard location.
> > >
> > > Signed-off-by: Alexander Miroshnichenko <alex@millerson.name>
> > > ---
> > > policy/modules/services/ssh.if | 18 ++++++++++++++++++
> > > 1 file changed, 18 insertions(+)
> > >
> > > diff --git a/policy/modules/services/ssh.if
> > > b/policy/modules/services/ssh.if
> > > index 0941f133711e..51c64ded00c4 100644
> > > --- a/policy/modules/services/ssh.if
> > > +++ b/policy/modules/services/ssh.if
> > > @@ -680,6 +680,24 @@ interface(`ssh_agent_exec',`
> > > can_exec($1, ssh_agent_exec_t)
> > > ')
> > > +########################################
> > > +## <summary>
> > > +## Search for keys in non-standard location
> > > +## </summary>
> > > +## <param name="domain">
> > > +## <summary>
> > > +## Domain allowed access.
> > > +## </summary>
> > > +## </param>
> > > +#
> > > +interface(`ssh_search_dir',`
> > > + gen_require(`
> > > + type sshd_t;
> > > + ')
> > > +
> > > + allow sshd_t $1:dir search_dir_perms;
> >
> > This is generally not allowed. The caller should generally be the source.
> > Regardless of the above. Keys should be in user home directories. I
> > wonder what specific scenario prompted you to propose this interface?
>
> GIT hosting software like gitolite/gitosis/gitea manage users ssh keys and
> store them own location like /var/lib/gitolite/.ssh . /var/lib/gitolite have
> gitosis_var_lib_t type, /var/lib/gitolite/.ssh have gitosis_ssh_home_t type
> (in patched policy which I want to submit).
> If sshd does not have { search getattr } permissions to full path to ssh key
> user fail to login.
> Can you propose corret way to give such permissions to multiple policies?
> It is incorrect to label /var/lib/gitolite as user_home_dir_t type, IMHO.
Yes this sucks. I would probably do the following instead:
1. echo "ignoredirs=/var/lib/gitolite" >> /etc/selinux/semanage.conf
2. semodule -B && restorecon -RvF /var/lib/gitolite
3. gitosis_read_lib_files(sshd_t)
Dont bother with labeling /var/lib/gitolite/.ssh differently
>
> > > +')
> > > +
> > > ########################################
> > > ## <summary>
> > > ## Read ssh home directory content ...
> >
>
--
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
Dominick Grift
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]
^ permalink raw reply
* ✗ Fi.CI.BAT: failure for drm/i915: Eliminate platform specific drm_driver vfuncs (rev2)
From: Patchwork @ 2019-06-20 15:27 UTC (permalink / raw)
To: Ville Syrjala; +Cc: intel-gfx
In-Reply-To: <20190619170842.20579-1-ville.syrjala@linux.intel.com>
== Series Details ==
Series: drm/i915: Eliminate platform specific drm_driver vfuncs (rev2)
URL : https://patchwork.freedesktop.org/series/62397/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_6312 -> Patchwork_13364
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_13364 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_13364, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13364/
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_13364:
### IGT changes ###
#### Possible regressions ####
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-kbl-r: [PASS][1] -> [DMESG-WARN][2]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/fi-kbl-r/igt@i915_pm_rpm@basic-pci-d3-state.html
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13364/fi-kbl-r/igt@i915_pm_rpm@basic-pci-d3-state.html
Known issues
------------
Here are the changes found in Patchwork_13364 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@gem_ctx_switch@basic-default:
- fi-icl-u2: [PASS][3] -> [INCOMPLETE][4] ([fdo#107713] / [fdo#108569])
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/fi-icl-u2/igt@gem_ctx_switch@basic-default.html
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13364/fi-icl-u2/igt@gem_ctx_switch@basic-default.html
- fi-icl-guc: [PASS][5] -> [INCOMPLETE][6] ([fdo#107713] / [fdo#108569])
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/fi-icl-guc/igt@gem_ctx_switch@basic-default.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13364/fi-icl-guc/igt@gem_ctx_switch@basic-default.html
* igt@kms_chamelium@dp-edid-read:
- fi-kbl-7500u: [PASS][7] -> [FAIL][8] ([fdo#109483] / [fdo#109635 ])
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/fi-kbl-7500u/igt@kms_chamelium@dp-edid-read.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13364/fi-kbl-7500u/igt@kms_chamelium@dp-edid-read.html
#### Possible fixes ####
* igt@gem_exec_suspend@basic-s3:
- fi-blb-e6850: [INCOMPLETE][9] ([fdo#107718]) -> [PASS][10]
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13364/fi-blb-e6850/igt@gem_exec_suspend@basic-s3.html
* igt@i915_selftest@live_contexts:
- fi-bdw-gvtdvm: [DMESG-FAIL][11] ([fdo#110235]) -> [PASS][12]
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13364/fi-bdw-gvtdvm/igt@i915_selftest@live_contexts.html
* igt@kms_chamelium@hdmi-hpd-fast:
- fi-kbl-7500u: [FAIL][13] ([fdo#109485]) -> [PASS][14]
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_6312/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13364/fi-kbl-7500u/igt@kms_chamelium@hdmi-hpd-fast.html
[fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713
[fdo#107718]: https://bugs.freedesktop.org/show_bug.cgi?id=107718
[fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569
[fdo#109483]: https://bugs.freedesktop.org/show_bug.cgi?id=109483
[fdo#109485]: https://bugs.freedesktop.org/show_bug.cgi?id=109485
[fdo#109635 ]: https://bugs.freedesktop.org/show_bug.cgi?id=109635
[fdo#110235]: https://bugs.freedesktop.org/show_bug.cgi?id=110235
Participating hosts (49 -> 45)
------------------------------
Additional (5): fi-cml-u2 fi-bxt-j4205 fi-gdg-551 fi-icl-dsi fi-cml-u
Missing (9): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-icl-u3 fi-icl-y fi-byt-clapper fi-bdw-samus
Build changes
-------------
* Linux: CI_DRM_6312 -> Patchwork_13364
CI_DRM_6312: 034e3ac6a2d180d188da927388b60c7e62c5655b @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5061: c88ced79a7b71aec58f1d9c5c599ac2f431bcf7a @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_13364: 45b946d745ad4db15e83dbc24d5417d0dd14e8c7 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
45b946d745ad drm/i915: Initialize drm_driver vblank funcs at compile time
a7d2d1782e47 drm/i915: Nuke drm_driver irq vfuncs
c56f41b785c6 drm/i915: Switch to per-crtc vblank vfuncs
a465bfc7ceab drm/i915: Fix various tracepoints for gen2
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_13364/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* Re: [PATCH v2 1/3] media: stm32-dcmi: improve sensor subdev naming
From: Sakari Ailus @ 2019-06-20 15:26 UTC (permalink / raw)
To: Hugues Fruchet
Cc: Yannick Fertre, Alexandre Torgue, Mickael GUENE, linux-kernel,
Philippe CORNU, Hans Verkuil, Benjamin Gaignard,
Mauro Carvalho Chehab, linux-stm32, linux-arm-kernel, linux-media
In-Reply-To: <1560242912-17138-2-git-send-email-hugues.fruchet@st.com>
Hi Hugues,
On Tue, Jun 11, 2019 at 10:48:30AM +0200, Hugues Fruchet wrote:
> Add a new "sensor" field to dcmi struct instead of
> reusing entity->subdev to address sensor subdev.
The purpose of the struct binding image source's async subdev as well as
related information is to allow associating the two. This patch breaks
that. If your device can support a single sensor, it might not be a big
deal. The end result remains somewhat inconsistent as subdev specific
information is spread across struct stm32_dcmi and struct
dcmi_graph_entity.
In general you don't need to know the sensor as you can always find it
using media_entity_remote_pad(). This driver is a little different though
as it could presumably continue to work without MC. Was that the intent?
On a side note: struct dcmi_graph_entity does NOT have struct
v4l2_async_subdev as its first member. Please fix that and prepend the fix
to this set.
--
Kind regards,
Sakari Ailus
sakari.ailus@linux.intel.com
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v2 1/3] media: stm32-dcmi: improve sensor subdev naming
From: Sakari Ailus @ 2019-06-20 15:26 UTC (permalink / raw)
To: Hugues Fruchet
Cc: Alexandre Torgue, Mauro Carvalho Chehab, Hans Verkuil,
linux-media, linux-arm-kernel, linux-kernel, linux-stm32,
Benjamin Gaignard, Yannick Fertre, Philippe CORNU, Mickael GUENE
In-Reply-To: <1560242912-17138-2-git-send-email-hugues.fruchet@st.com>
Hi Hugues,
On Tue, Jun 11, 2019 at 10:48:30AM +0200, Hugues Fruchet wrote:
> Add a new "sensor" field to dcmi struct instead of
> reusing entity->subdev to address sensor subdev.
The purpose of the struct binding image source's async subdev as well as
related information is to allow associating the two. This patch breaks
that. If your device can support a single sensor, it might not be a big
deal. The end result remains somewhat inconsistent as subdev specific
information is spread across struct stm32_dcmi and struct
dcmi_graph_entity.
In general you don't need to know the sensor as you can always find it
using media_entity_remote_pad(). This driver is a little different though
as it could presumably continue to work without MC. Was that the intent?
On a side note: struct dcmi_graph_entity does NOT have struct
v4l2_async_subdev as its first member. Please fix that and prepend the fix
to this set.
--
Kind regards,
Sakari Ailus
sakari.ailus@linux.intel.com
^ permalink raw reply
* [Qemu-devel] [PATCH 0/3] add ati vgabios
From: Gerd Hoffmann @ 2019-06-20 15:11 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
Gerd Hoffmann (3):
seabios: add config for ati vgabios
seabios: add ati vgabios binary
ati-vga: switch to vgabios-ati.bin
hw/display/ati.c | 2 +-
pc-bios/vgabios-ati.bin | Bin 0 -> 38912 bytes
roms/config.vga-ati | 4 ++++
3 files changed, 5 insertions(+), 1 deletion(-)
create mode 100644 pc-bios/vgabios-ati.bin
create mode 100644 roms/config.vga-ati
--
2.18.1
^ permalink raw reply
* Re: [PATCH v1 5/5] coresight: etm4x: save/restore state across CPU low power states
From: Mathieu Poirier @ 2019-06-20 15:26 UTC (permalink / raw)
To: Andrew Murray; +Cc: Alexander Shishkin, linux-arm-kernel, Suzuki K Poulose
In-Reply-To: <20190620151133.GG20984@e119886-lin.cambridge.arm.com>
On Thu, Jun 20, 2019 at 04:11:34PM +0100, Andrew Murray wrote:
> On Thu, Jun 20, 2019 at 08:49:47AM -0600, Mathieu Poirier wrote:
> > Hi Andrew,
> >
> > On Thu, 20 Jun 2019 at 05:07, Andrew Murray <andrew.murray@arm.com> wrote:
> > >
> > > On Tue, Jun 18, 2019 at 04:55:49PM -0600, Mathieu Poirier wrote:
> > > > On Tue, Jun 18, 2019 at 01:54:33PM +0100, Andrew Murray wrote:
> > > > > Some hardware will ignore bit TRCPDCR.PU which is used to signal
> > > > > to hardware that power should not be removed from the trace unit.
> > > > > Let's mitigate against this by saving and restoring the trace
> > > > > unit state when the CPU enters low power states.
> > > > >
> > > > > To provide the benefit to both self-hosted and external debuggers
> > > > > we save/restore the entire state which includes etmv4_config data
> > > > > and dynamic data such as inflight counter values, sequencer
> > > > > states, etc.
> > > > >
> > > > > To reduce CPU suspend/resume latency the state is only saved or
> > > > > restored if coresight is in use as determined by the claimset
> > > > > registers.
> > > > >
> > > > > To aid debug of CPU suspend/resume a disable_pm_save parameter
> > > > > is provided to disable this feature.
> > > > >
> > > > > Signed-off-by: Andrew Murray <andrew.murray@arm.com>
> > > > > ---
> > > > > drivers/hwtracing/coresight/coresight-etm4x.c | 245 ++++++++++++++++++
> > > > > drivers/hwtracing/coresight/coresight-etm4x.h | 66 ++++-
> > > > > drivers/hwtracing/coresight/coresight.c | 2 +-
> > > > > include/linux/coresight.h | 7 +
> > > > > 4 files changed, 318 insertions(+), 2 deletions(-)
> > > > >
> > > > > diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c
> > > > > index bda90d4cd62b..d27c5e0d9aec 100644
> > > > > --- a/drivers/hwtracing/coresight/coresight-etm4x.c
> > > > > +++ b/drivers/hwtracing/coresight/coresight-etm4x.c
> > > > > @@ -18,6 +18,7 @@
> > > > > #include <linux/stat.h>
> > > > > #include <linux/clk.h>
> > > > > #include <linux/cpu.h>
> > > > > +#include <linux/cpu_pm.h>
> > > > > #include <linux/coresight.h>
> > > > > #include <linux/coresight-pmu.h>
> > > > > #include <linux/pm_wakeup.h>
> > > > > @@ -36,6 +37,9 @@
> > > > > static int boot_enable;
> > > > > module_param_named(boot_enable, boot_enable, int, 0444);
> > > > >
> > > > > +static int disable_pm_save;
> > > > > +module_param_named(disable_pm_save, disable_pm_save, int, 0444);
> > > > > +
> > > > > /* The number of ETMv4 currently registered */
> > > > > static int etm4_count;
> > > > > static struct etmv4_drvdata *etmdrvdata[NR_CPUS];
> > > > > @@ -53,6 +57,14 @@ static void etm4_os_unlock(struct etmv4_drvdata *drvdata)
> > > > > isb();
> > > > > }
> > > > >
> > > > > +static void etm4_os_lock(struct etmv4_drvdata *drvdata)
> > > > > +{
> > > > > + /* Writing 0x1 to TRCOSLAR unlocks the trace registers */
> > > > > + writel_relaxed(0x1, drvdata->base + TRCOSLAR);
> > > > > + drvdata->os_unlock = false;
> > > > > + isb();
> > > > > +}
> > > > > +
> > > > > static bool etm4_arch_supported(u8 arch)
> > > > > {
> > > > > /* Mask out the minor version number */
> > > > > @@ -1076,6 +1088,235 @@ static void etm4_init_trace_id(struct etmv4_drvdata *drvdata)
> > > > > drvdata->trcid = coresight_get_trace_id(drvdata->cpu);
> > > > > }
> > > > >
> > > > > +#ifdef CONFIG_CPU_PM
> > > > > +static void etm4_cpu_save(struct etmv4_drvdata *drvdata)
> > > > > +{
> > > > > + int i;
> > > > > + u32 control;
> > > > > + struct etmv4_save_state *state;
> > > >
> > > > Before going any further I would make sure the CPU this is running on it equal
> > > > to drvdata->cpu. Otherwise something very wrong happened.
> > > >
> > >
> > > Sure I'll add that.
> > >
> > > > > +
> > > > > + /* As recommended by 3.4.1 of ARM IHI 0064D */
> > > > > + dsb(sy);
> > > > > + isb();
> > > > > +
> > > > > + CS_UNLOCK(drvdata->base);
> > > > > + etm4_os_lock(drvdata);
> > > >
> > > > Please add a comment to explain that you are using the OS lock to disable
> > > > external debugger access to the trace registers while the unit is powered down.
> > > > Otherwise people will get confused and will submit patches that changes
> > > > etm4_os_lock() to etm4_os_unlock().
> > >
> > > Yes sure, it deserves a comment.
> > >
> > > >
> > > > > +
> > > > > + /* wait for TRCSTATR.PMSTABLE to go up */
> > > > > + if (coresight_timeout(drvdata->base, TRCSTATR,
> > > > > + TRCSTATR_PMSTABLE_BIT, 1))
> > > > > + dev_err(drvdata->dev,
> > > > > + "timeout while waiting for Idle Trace Status\n");
> > > >
> > > > The above comment is not accurate since we are waiting for the PMSTABLE bit.
> > >
> > > I'll change that.
> > >
> > > >
> > > > > +
> > > > > + state = &drvdata->save_state;
> > > > > +
> > > > > + state->trcprgctlr = readl(drvdata->base + TRCPRGCTLR);
> > > > > + state->trcprocselr = readl(drvdata->base + TRCPROCSELR);
> > > > > + state->trcconfigr = readl(drvdata->base + TRCCONFIGR);
> > > > > + state->trcauxctlr = readl(drvdata->base + TRCAUXCTLR);
> > > > > + state->trceventctl0r = readl(drvdata->base + TRCEVENTCTL0R);
> > > > > + state->trceventctl1r = readl(drvdata->base + TRCEVENTCTL1R);
> > > > > + state->trcstallctlr = readl(drvdata->base + TRCSTALLCTLR);
> > > > > + state->trctsctlr = readl(drvdata->base + TRCTSCTLR);
> > > > > + state->trcsyncpr = readl(drvdata->base + TRCSYNCPR);
> > > > > + state->trcccctlr = readl(drvdata->base + TRCCCCTLR);
> > > > > + state->trcbbctlr = readl(drvdata->base + TRCBBCTLR);
> > > > > + state->trctraceidr = readl(drvdata->base + TRCTRACEIDR);
> > > > > + state->trcqctlr = readl(drvdata->base + TRCQCTLR);
> > > > > +
> > > > > + state->trcvictlr = readl(drvdata->base + TRCVICTLR);
> > > > > + state->trcviiectlr = readl(drvdata->base + TRCVIIECTLR);
> > > > > + state->trcvissctlr = readl(drvdata->base + TRCVISSCTLR);
> > > > > + state->trcvipcssctlr = readl(drvdata->base + TRCVIPCSSCTLR);
> > > > > + state->trcvdctlr = readl(drvdata->base + TRCVDCTLR);
> > > > > + state->trcvdsacctlr = readl(drvdata->base + TRCVDSACCTLR);
> > > > > + state->trcvdarcctlr = readl(drvdata->base + TRCVDARCCTLR);
> > > > > +
> > > > > + for (i = 0; i < drvdata->nrseqstate; i++)
> > > > > + state->trcseqevr[i] = readl(drvdata->base + TRCSEQEVRn(i));
> > > > > +
> > > > > + state->trcseqrstevr = readl(drvdata->base + TRCSEQRSTEVR);
> > > > > + state->trcseqstr = readl(drvdata->base + TRCSEQSTR);
> > > > > + state->trcextinselr = readl(drvdata->base + TRCEXTINSELR);
> > > > > +
> > > > > + for (i = 0; i < drvdata->nr_cntr; i++) {
> > > > > + state->trccntrldvr[i] = readl(drvdata->base + TRCCNTRLDVRn(i));
> > > > > + state->trccntctlr[i] = readl(drvdata->base + TRCCNTCTLRn(i));
> > > > > + state->trccntvr[i] = readl(drvdata->base + TRCCNTVRn(i));
> > > > > + }
> > > > > +
> > > > > + for (i = 0; i < drvdata->nr_resource * 2; i++)
> > > > > + state->trcrsctlr[i] = readl(drvdata->base + TRCRSCTLRn(i));
> > > > > +
> > > > > + for (i = 0; i < drvdata->nr_ss_cmp; i++) {
> > > > > + state->trcssccr[i] = readl(drvdata->base + TRCSSCCRn(i));
> > > > > + state->trcsscsr[i] = readl(drvdata->base + TRCSSCSRn(i));
> > > > > + state->trcsspcicr[i] = readl(drvdata->base + TRCSSPCICRn(i));
> > > > > + }
> > > > > +
> > > > > + for (i = 0; i < drvdata->nr_addr_cmp * 2; i++) {
> > > > > + state->trcacvr[i] = readl(drvdata->base + TRCACVRn(i));
> > > > > + state->trcacatr[i] = readl(drvdata->base + TRCACATRn(i));
> > > > > + }
> > > > > +
> > > > > + for (i = 0; i < drvdata->numcidc; i++)
> > > > > + state->trccidcvr[i] = readl(drvdata->base + TRCCIDCVRn(i));
> > > > > +
> > > > > + for (i = 0; i < drvdata->numvmidc; i++)
> > > > > + state->trcvmidcvr[i] = readl(drvdata->base + TRCVMIDCVRn(i));
> > > > > +
> > > > > + state->trccidcctlr0 = readl(drvdata->base + TRCCIDCCTLR0);
> > > > > + state->trccidcctlr1 = readl(drvdata->base + TRCCIDCCTLR1);
> > > > > +
> > > > > + state->trcvmidcctlr0 = readl(drvdata->base + TRCVMIDCCTLR0);
> > > > > + state->trcvmidcctlr0 = readl(drvdata->base + TRCVMIDCCTLR1);
> > > > > +
> > > > > + state->trcclaimset = readl(drvdata->base + TRCCLAIMCLR);
> > > > > +
> > > > > + /* wait for TRCSTATR.IDLE to go up */
> > > > > + if (coresight_timeout(drvdata->base, TRCSTATR, TRCSTATR_IDLE_BIT, 1))
> > > > > + dev_err(drvdata->dev,
> > > > > + "timeout while waiting for Idle Trace Status\n");
> > > > > +
> > > > > + /* power can be removed from the trace unit now */
> > > > > + control = readl_relaxed(drvdata->base + TRCPDCR);
> > > > > + control &= ~TRCPDCR_PU;
> > > > > + writel_relaxed(control, drvdata->base + TRCPDCR);
> > > > > +
> > > > > + CS_LOCK(drvdata->base);
> > > > > +}
> > > > > +
> > > > > +static void etm4_cpu_restore(struct etmv4_drvdata *drvdata)
> > > > > +{
> > > > > + int i;
> > > > > + struct etmv4_save_state *state;
> > > > > +
> > > > > + state = &drvdata->save_state;
> > > >
> > > > Same comment as above about the running CPU.
> > > >
> > > > > +
> > > > > + CS_UNLOCK(drvdata->base);
> > > > > +
> > > > > + writel_relaxed(state->trcclaimset, drvdata->base + TRCCLAIMSET);
> > > > > +
> > > > > + writel_relaxed(state->trcprgctlr, drvdata->base + TRCPRGCTLR);
> > > > > + writel_relaxed(state->trcprocselr, drvdata->base + TRCPROCSELR);
> > > > > + writel_relaxed(state->trcconfigr, drvdata->base + TRCCONFIGR);
> > > > > + writel_relaxed(state->trcauxctlr, drvdata->base + TRCAUXCTLR);
> > > > > + writel_relaxed(state->trceventctl0r, drvdata->base + TRCEVENTCTL0R);
> > > > > + writel_relaxed(state->trceventctl1r, drvdata->base + TRCEVENTCTL1R);
> > > > > + writel_relaxed(state->trcstallctlr, drvdata->base + TRCSTALLCTLR);
> > > > > + writel_relaxed(state->trctsctlr, drvdata->base + TRCTSCTLR);
> > > > > + writel_relaxed(state->trcsyncpr, drvdata->base + TRCSYNCPR);
> > > > > + writel_relaxed(state->trcccctlr, drvdata->base + TRCCCCTLR);
> > > > > + writel_relaxed(state->trcbbctlr, drvdata->base + TRCBBCTLR);
> > > > > + writel_relaxed(state->trctraceidr, drvdata->base + TRCTRACEIDR);
> > > > > + writel_relaxed(state->trcqctlr, drvdata->base + TRCQCTLR);
> > > > > +
> > > > > + writel_relaxed(state->trcvictlr, drvdata->base + TRCVICTLR);
> > > > > + writel_relaxed(state->trcviiectlr, drvdata->base + TRCVIIECTLR);
> > > > > + writel_relaxed(state->trcvissctlr, drvdata->base + TRCVISSCTLR);
> > > > > + writel_relaxed(state->trcvipcssctlr, drvdata->base + TRCVIPCSSCTLR);
> > > > > + writel_relaxed(state->trcvdctlr, drvdata->base + TRCVDCTLR);
> > > > > + writel_relaxed(state->trcvdsacctlr, drvdata->base + TRCVDSACCTLR);
> > > > > + writel_relaxed(state->trcvdarcctlr, drvdata->base + TRCVDARCCTLR);
> > > > > +
> > > > > + for (i = 0; i < drvdata->nrseqstate; i++)
> > > > > + writel_relaxed(state->trcseqevr[i],
> > > > > + drvdata->base + TRCSEQEVRn(i));
> > > > > +
> > > > > + writel_relaxed(state->trcseqrstevr, drvdata->base + TRCSEQRSTEVR);
> > > > > + writel_relaxed(state->trcseqstr, drvdata->base + TRCSEQSTR);
> > > > > + writel_relaxed(state->trcextinselr, drvdata->base + TRCEXTINSELR);
> > > > > +
> > > > > + for (i = 0; i < drvdata->nr_cntr; i++) {
> > > > > + writel_relaxed(state->trccntrldvr[i],
> > > > > + drvdata->base + TRCCNTRLDVRn(i));
> > > > > + writel_relaxed(state->trccntctlr[i],
> > > > > + drvdata->base + TRCCNTCTLRn(i));
> > > > > + writel_relaxed(state->trccntvr[i],
> > > > > + drvdata->base + TRCCNTVRn(i));
> > > > > + }
> > > > > +
> > > > > + for (i = 0; i < drvdata->nr_resource * 2; i++)
> > > > > + writel_relaxed(state->trcrsctlr[i],
> > > > > + drvdata->base + TRCRSCTLRn(i));
> > > > > +
> > > > > + for (i = 0; i < drvdata->nr_ss_cmp; i++) {
> > > > > + writel_relaxed(state->trcssccr[i],
> > > > > + drvdata->base + TRCSSCCRn(i));
> > > > > + writel_relaxed(state->trcsscsr[i],
> > > > > + drvdata->base + TRCSSCSRn(i));
> > > > > + writel_relaxed(state->trcsspcicr[i],
> > > > > + drvdata->base + TRCSSPCICRn(i));
> > > > > + }
> > > > > +
> > > > > + for (i = 0; i < drvdata->nr_addr_cmp * 2; i++) {
> > > > > + writel_relaxed(state->trcacvr[i],
> > > > > + drvdata->base + TRCACVRn(i));
> > > > > + writel_relaxed(state->trcacatr[i],
> > > > > + drvdata->base + TRCACATRn(i));
> > > > > + }
> > > > > +
> > > > > + for (i = 0; i < drvdata->numcidc; i++)
> > > > > + writel_relaxed(state->trccidcvr[i],
> > > > > + drvdata->base + TRCCIDCVRn(i));
> > > > > +
> > > > > + for (i = 0; i < drvdata->numvmidc; i++)
> > > > > + writel_relaxed(state->trcvmidcvr[i],
> > > > > + drvdata->base + TRCVMIDCVRn(i));
> > > > > +
> > > > > + writel_relaxed(state->trccidcctlr0, drvdata->base + TRCCIDCCTLR0);
> > > > > + writel_relaxed(state->trccidcctlr1, drvdata->base + TRCCIDCCTLR1);
> > > > > +
> > > > > + writel_relaxed(state->trcvmidcctlr0, drvdata->base + TRCVMIDCCTLR0);
> > > > > + writel_relaxed(state->trcvmidcctlr0, drvdata->base + TRCVMIDCCTLR1);
> > > > > +
> > > > > + writel_relaxed(state->trcclaimset, drvdata->base + TRCCLAIMSET);
> > > > > +
> > > > > + /* As recommended by 4.3.7 of ARM IHI 0064D */
> > > > > + dsb(sy);
> > > > > + isb();
> > > > > +
> > > > > + etm4_os_unlock(drvdata);
> > > >
> > > > Same comment as above.
> > > >
> > > > > + CS_LOCK(drvdata->base);
> > > > > +}
> > > > > +
> > > > > +static int etm4_cpu_pm_notify(struct notifier_block *nb, unsigned long cmd,
> > > > > + void *v)
> > > > > +{
> > > > > + struct etmv4_drvdata *drvdata = container_of(nb,
> > > > > + struct etmv4_drvdata, nb);
> > > > > +
> > > > > + if (disable_pm_save)
> > > > > + return NOTIFY_OK;
> > > > > +
> > > > > + switch (cmd) {
> > > > > + case CPU_PM_ENTER:
> > > > > + /* save the state if coresight is in use */
> > > > > + if (coresight_is_claimed_any(drvdata->base))
> > > >
> > > > claimed_any()? At this point if coresight_is_claimed_self_hosted() == false an
> > > > external agent is competing with the framework and we should abdicate.
> > >
> > > If we only support save/restore for self-hosted, then we don't actually need
> > > to store as much state as much of it is in the etmv4_config structure.
> > >
> > > My thinking here was that if an external agent is being used and we power down
> > > then we'd also potentially suffer the same issue where state is lost. So
> > > saving/restoring may be helpful for external agents as well (or at least
> > > wouldn't do harm)...
> >
> > There is no point in trying to cover cases where external agents are
> > involved - we will always get it wrong.
>
> OK, given that I don't know of any particular cases where this is an issue
> I'm happy to change this to !coresight_is_claimed_self_hosted().
>
> > And the notifiers shouldn't
> > return immediately if a tracer is not being used.
>
> What should they do? We only need to save/restore when there is an active
> session don't we? Have I misunderstood?
Arrggghhh.... Twitchy finger.
And the notifier *should* return immediately if a tracer is not being used.
>
> Thanks,
>
> Andrew Murray
>
> >
> > >
> > > However I don't know if this is a real issue.
> > >
> > > >
> > > > > + etm4_cpu_save(drvdata);
> > > > > + break;
> > > > > + case CPU_PM_EXIT:
> > > > > + case CPU_PM_ENTER_FAILED:
> > > > > + /* trcclaimset is set when there is state to restore */
> > > > > + if (drvdata->save_state.trcclaimset)
> > > > > + etm4_cpu_restore(drvdata);
> > > > > + break;
> > > > > + default:
> > > > > + return NOTIFY_DONE;
> > > > > + }
> > > > > +
> > > > > + return NOTIFY_OK;
> > > > > +}
> > > > > +
> > > > > +static int etm4_cpu_pm_register(struct etmv4_drvdata *drvdata)
> > > > > +{
> > > > > + drvdata->nb.notifier_call = etm4_cpu_pm_notify;
> > > > > + return cpu_pm_register_notifier(&drvdata->nb);
> > > > > +}
> > > > > +#else
> > > > > +static int etm4_cpu_pm_register(struct etmv4_drvdata *drvdata) { return 0; }
> > > > > +#endif
> > > > > +
> > > > > static int etm4_probe(struct amba_device *adev, const struct amba_id *id)
> > > > > {
> > > > > int ret;
> > > > > @@ -1141,6 +1382,10 @@ static int etm4_probe(struct amba_device *adev, const struct amba_id *id)
> > > > > etm4_init_trace_id(drvdata);
> > > > > etm4_set_default(&drvdata->config);
> > > > >
> > > > > + ret = etm4_cpu_pm_register(drvdata);
> > > > > + if (ret)
> > > > > + goto err_arch_supported;
> > > > > +
> > > > > desc.type = CORESIGHT_DEV_TYPE_SOURCE;
> > > > > desc.subtype.source_subtype = CORESIGHT_DEV_SUBTYPE_SOURCE_PROC;
> > > > > desc.ops = &etm4_cs_ops;
> > > > > diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h
> > > > > index 52786e9d8926..f4cff447c8a1 100644
> > > > > --- a/drivers/hwtracing/coresight/coresight-etm4x.h
> > > > > +++ b/drivers/hwtracing/coresight/coresight-etm4x.h
> > > > > @@ -174,7 +174,8 @@
> > > > > ETM_MODE_EXCL_KERN | \
> > > > > ETM_MODE_EXCL_USER)
> > > > >
> > > > > -#define TRCSTATR_IDLE_BIT 0
> > > > > +#define TRCSTATR_IDLE_BIT BIT(0)
> > > > > +#define TRCSTATR_PMSTABLE_BIT BIT(1)
> > > > > #define ETM_DEFAULT_ADDR_COMP 0
> > > > >
> > > > > /* PowerDown Control Register bits */
> > > > > @@ -281,6 +282,65 @@ struct etmv4_config {
> > > > > u32 ext_inp;
> > > > > };
> > > > >
> > > > > +/**
> > > > > + * struct etm4_save_state - state to be preserved when ETM is without power
> > > > > + */
> > > > > +struct etmv4_save_state {
> > > > > + u32 trcprgctlr;
> > > > > + u32 trcprocselr;
> > > > > + u32 trcconfigr;
> > > > > + u32 trcauxctlr;
> > > > > + u32 trceventctl0r;
> > > > > + u32 trceventctl1r;
> > > > > + u32 trcstallctlr;
> > > > > + u32 trctsctlr;
> > > > > + u32 trcsyncpr;
> > > > > + u32 trcccctlr;
> > > > > + u32 trcbbctlr;
> > > > > + u32 trctraceidr;
> > > > > + u32 trcqctlr;
> > > > > +
> > > > > + u32 trcvictlr;
> > > > > + u32 trcviiectlr;
> > > > > + u32 trcvissctlr;
> > > > > + u32 trcvipcssctlr;
> > > > > + u32 trcvdctlr;
> > > > > + u32 trcvdsacctlr;
> > > > > + u32 trcvdarcctlr;
> > > > > +
> > > > > + u32 trcseqevr[ETM_MAX_SEQ_STATES];
> > > > > + u32 trcseqrstevr;
> > > > > + u32 trcseqstr;
> > > > > + u32 trcextinselr;
> > > > > + u32 trccntrldvr[ETMv4_MAX_CNTR];
> > > > > + u32 trccntctlr[ETMv4_MAX_CNTR];
> > > > > + u32 trccntvr[ETMv4_MAX_CNTR];
> > > > > +
> > > > > + u32 trcrsctlr[ETM_MAX_RES_SEL * 2];
> > > > > +
> > > > > + u32 trcssccr[ETM_MAX_SS_CMP];
> > > > > + u32 trcsscsr[ETM_MAX_SS_CMP];
> > > > > + u32 trcsspcicr[ETM_MAX_SS_CMP];
> > > > > +
> > > > > + u64 trcacvr[ETM_MAX_SINGLE_ADDR_CMP];
> > > > > + u64 trcacatr[ETM_MAX_SINGLE_ADDR_CMP];
> > > > > + u64 trcdvcvr[ETM_MAX_DATA_VAL_CMP];
> > > > > + u64 trcdvcmr[ETM_MAX_DATA_VAL_CMP];
> > > > > + u64 trccidcvr[ETMv4_MAX_CTXID_CMP];
> > > > > + u32 trcvmidcvr[ETM_MAX_VMID_CMP];
> > > > > + u32 trccidcctlr0;
> > > > > + u32 trccidcctlr1;
> > > > > + u32 trcvmidcctlr0;
> > > > > + u32 trcvmidcctlr1;
> > > > > +
> > > > > + u32 trcclaimset;
> > > > > +
> > > > > + u32 cntr_val[ETMv4_MAX_CNTR];
> > > > > + u32 seq_state;
> > > > > + u32 vinst_ctrl;
> > > > > + u32 ss_status[ETM_MAX_SS_CMP];
> > > > > +};
> > > > > +
> > > > > /**
> > > > > * struct etm4_drvdata - specifics associated to an ETM component
> > > > > * @base: Memory mapped base address for this component.
> > > > > @@ -337,6 +397,8 @@ struct etmv4_config {
> > > > > * @atbtrig: If the implementation can support ATB triggers
> > > > > * @lpoverride: If the implementation can support low-power state over.
> > > > > * @config: structure holding configuration parameters.
> > > > > + * @save_state: State to be preserved across power loss
> > > > > + * @nb: CPU PM notifier
> > > > > */
> > > > > struct etmv4_drvdata {
> > > > > void __iomem *base;
> > > > > @@ -383,6 +445,8 @@ struct etmv4_drvdata {
> > > > > bool atbtrig;
> > > > > bool lpoverride;
> > > > > struct etmv4_config config;
> > > > > + struct etmv4_save_state save_state;
> > > > > + struct notifier_block nb;
> > > > > };
> > > > >
> > > > > /* Address comparator access types */
> > > > > diff --git a/drivers/hwtracing/coresight/coresight.c b/drivers/hwtracing/coresight/coresight.c
> > > > > index 4b130281236a..e85d09e597a0 100644
> > > > > --- a/drivers/hwtracing/coresight/coresight.c
> > > > > +++ b/drivers/hwtracing/coresight/coresight.c
> > > > > @@ -140,7 +140,7 @@ static inline bool coresight_is_claimed_self_hosted(void __iomem *base)
> > > > > return coresight_read_claim_tags(base) == CORESIGHT_CLAIM_SELF_HOSTED;
> > > > > }
> > > > >
> > > > > -static inline bool coresight_is_claimed_any(void __iomem *base)
> > > > > +bool coresight_is_claimed_any(void __iomem *base)
> > > > > {
> > > > > return coresight_read_claim_tags(base) != 0;
> > > > > }
> > > > > diff --git a/include/linux/coresight.h b/include/linux/coresight.h
> > > > > index 62a520df8add..4f7ba923ffc4 100644
> > > > > --- a/include/linux/coresight.h
> > > > > +++ b/include/linux/coresight.h
> > > > > @@ -268,6 +268,8 @@ extern int coresight_claim_device_unlocked(void __iomem *base);
> > > > > extern void coresight_disclaim_device(void __iomem *base);
> > > > > extern void coresight_disclaim_device_unlocked(void __iomem *base);
> > > > >
> > > > > +extern bool coresight_is_claimed_any(void __iomem *base);
> > > > > +
> > > > > #else
> > > > > static inline struct coresight_device *
> > > > > coresight_register(struct coresight_desc *desc) { return NULL; }
> > > > > @@ -290,6 +292,11 @@ static inline int coresight_claim_device(void __iomem *base)
> > > > > static inline void coresight_disclaim_device(void __iomem *base) {}
> > > > > static inline void coresight_disclaim_device_unlocked(void __iomem *base) {}
> > > > >
> > > > > +static inline bool coresight_is_claimed_any(void __iomem *base)
> > > > > +{
> > > > > + return false;
> > > > > +}
> > > > > +
> > > >
> > > > I wanted to test your code but it doesn't apply on the CS next branch:
> > > >
> > > > https://git.linaro.org/kernel/coresight.git/log/?h=next
> > >
> > > Oh sorry about that, this was ontop of v5.2-rc5, I'll rebase to the CS branch
> > > on the next iteration.
> > >
> > > Thanks for the responsive feedback.
> > >
> > > Andrew Murray
> > >
> > > >
> > > > Thanks,
> > > > Mathieu
> > > >
> > > > > #endif
> > > > >
> > > > > #ifdef CONFIG_OF
> > > > > --
> > > > > 2.21.0
> > > > >
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH net-next] netfilter: ipv6: Fix build error without CONFIG_IPV6
From: Yuehaibing @ 2019-06-20 15:26 UTC (permalink / raw)
To: pablo, kadlec, fw, davem, rdunlap
Cc: linux-kernel, coreteam, netfilter-devel, netdev
In-Reply-To: <20190612084715.21656-1-yuehaibing@huawei.com>
Friendly ping...
On 2019/6/12 16:47, YueHaibing wrote:
> If CONFIG_IPV6 is not set, building fails:
>
> net/bridge/netfilter/nf_conntrack_bridge.o: In function `nf_ct_bridge_pre':
> nf_conntrack_bridge.c:(.text+0x41c): undefined symbol `nf_ct_frag6_gather'
> net/bridge/netfilter/nf_conntrack_bridge.o: In function `nf_ct_bridge_post':
> nf_conntrack_bridge.c:(.text+0x820): undefined symbol `br_ip6_fragment'
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Fixes: c9bb6165a16e ("netfilter: nf_conntrack_bridge: fix CONFIG_IPV6=y")
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> include/linux/netfilter_ipv6.h | 10 ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/netfilter_ipv6.h b/include/linux/netfilter_ipv6.h
> index 3a3dc4b..0e1febc 100644
> --- a/include/linux/netfilter_ipv6.h
> +++ b/include/linux/netfilter_ipv6.h
> @@ -108,8 +108,11 @@ static inline int nf_ipv6_br_defrag(struct net *net, struct sk_buff *skb,
> return 1;
>
> return v6_ops->br_defrag(net, skb, user);
> -#else
> +#endif
> +#if IS_BUILTIN(CONFIG_IPV6)
> return nf_ct_frag6_gather(net, skb, user);
> +#else
> + return 1;
> #endif
> }
>
> @@ -133,8 +136,11 @@ static inline int nf_br_ip6_fragment(struct net *net, struct sock *sk,
> return 1;
>
> return v6_ops->br_fragment(net, sk, skb, data, output);
> -#else
> +#endif
> +#if IS_BUILTIN(CONFIG_IPV6)
> return br_ip6_fragment(net, sk, skb, data, output);
> +#else
> + return 1;
> #endif
> }
>
>
^ permalink raw reply
* [Qemu-devel] [PATCH 3/3] ati-vga: switch to vgabios-ati.bin
From: Gerd Hoffmann @ 2019-06-20 15:11 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
In-Reply-To: <20190620151104.2678-1-kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/display/ati.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/display/ati.c b/hw/display/ati.c
index 61e351a0248d..6fbdda288f07 100644
--- a/hw/display/ati.c
+++ b/hw/display/ati.c
@@ -893,7 +893,7 @@ static void ati_vga_class_init(ObjectClass *klass, void *data)
k->class_id = PCI_CLASS_DISPLAY_VGA;
k->vendor_id = PCI_VENDOR_ID_ATI;
k->device_id = PCI_DEVICE_ID_ATI_RAGE128_PF;
- k->romfile = "vgabios-stdvga.bin";
+ k->romfile = "vgabios-ati.bin";
k->realize = ati_vga_realize;
k->exit = ati_vga_exit;
}
--
2.18.1
^ permalink raw reply related
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.