All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH V2 2/2] mailbox: introduce ARM SMC based mailbox
From: Sudeep Holla @ 2019-06-20 11:15 UTC (permalink / raw)
  To: Peng Fan
  Cc: robh+dt@kernel.org, mark.rutland@arm.com,
	jassisinghbrar@gmail.com, f.fainelli@gmail.com,
	kernel@pengutronix.de, dl-linux-imx, shawnguo@kernel.org,
	festevam@gmail.com, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, andre.przywara@arm.com,
	van.freenix@gmail.com, Sudeep Holla
In-Reply-To: <AM0PR04MB4481203DE76D290F311E3BFA88E40@AM0PR04MB4481.eurprd04.prod.outlook.com>

On Thu, Jun 20, 2019 at 10:21:09AM +0000, Peng Fan wrote:
> Hi Sudeep,
>
> > Subject: Re: [PATCH V2 2/2] mailbox: introduce ARM SMC based mailbox
> >
> > On Mon, Jun 03, 2019 at 04:30:05PM +0800, peng.fan@nxp.com wrote:
> > > From: Peng Fan <peng.fan@nxp.com>
> > >
> > > This mailbox driver implements a mailbox which signals transmitted
> > > data via an ARM smc (secure monitor call) instruction. The mailbox
> > > receiver is implemented in firmware and can synchronously return data
> > > when it returns execution to the non-secure world again.
> > > An asynchronous receive path is not implemented.
> > > This allows the usage of a mailbox to trigger firmware actions on SoCs
> > > which either don't have a separate management processor or on which
> > > such a core is not available. A user of this mailbox could be the SCP
> > > interface.
> > >
> > > Modified from Andre Przywara's v2 patch
> > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore
> > > .kernel.org%2Fpatchwork%2Fpatch%2F812999%2F&amp;data=02%7C01%7
> > Cpeng.fa
> > >
> > n%40nxp.com%7C6b37f78032e446be750e08d6f560e707%7C686ea1d3bc2b4
> > c6fa92cd
> > >
> > 99c5c301635%7C0%7C0%7C636966193913988679&amp;sdata=UNM4MTPs
> > brqoMqWStEy
> > > YzzwMEWTmX7hHO3TeNEz%2BOAw%3D&amp;reserved=0
> > >
> > > Cc: Andre Przywara <andre.przywara@arm.com>
> > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > ---
> > >
> > > V2:
> > >  Add interrupts notification support.
> > >
> > >  drivers/mailbox/Kconfig                 |   7 ++
> > >  drivers/mailbox/Makefile                |   2 +
> > >  drivers/mailbox/arm-smc-mailbox.c       | 190
> > ++++++++++++++++++++++++++++++++
> > >  include/linux/mailbox/arm-smc-mailbox.h |  10 ++
> > >  4 files changed, 209 insertions(+)
> > >  create mode 100644 drivers/mailbox/arm-smc-mailbox.c  create mode
> > > 100644 include/linux/mailbox/arm-smc-mailbox.h
> > >
> > > diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig index
> > > 595542bfae85..c3bd0f1ddcd8 100644
> > > --- a/drivers/mailbox/Kconfig
> > > +++ b/drivers/mailbox/Kconfig
> > > @@ -15,6 +15,13 @@ config ARM_MHU
> > >  	  The controller has 3 mailbox channels, the last of which can be
> > >  	  used in Secure mode only.
> > >
> > > +config ARM_SMC_MBOX
> > > +	tristate "Generic ARM smc mailbox"
> > > +	depends on OF && HAVE_ARM_SMCCC
> > > +	help
> > > +	  Generic mailbox driver which uses ARM smc calls to call into
> > > +	  firmware for triggering mailboxes.
> > > +
> > >  config IMX_MBOX
> > >  	tristate "i.MX Mailbox"
> > >  	depends on ARCH_MXC || COMPILE_TEST
> > > diff --git a/drivers/mailbox/Makefile b/drivers/mailbox/Makefile index
> > > c22fad6f696b..93918a84c91b 100644
> > > --- a/drivers/mailbox/Makefile
> > > +++ b/drivers/mailbox/Makefile
> > > @@ -7,6 +7,8 @@ obj-$(CONFIG_MAILBOX_TEST)	+= mailbox-test.o
> > >
> > >  obj-$(CONFIG_ARM_MHU)	+= arm_mhu.o
> > >
> > > +obj-$(CONFIG_ARM_SMC_MBOX)	+= arm-smc-mailbox.o
> > > +
> > >  obj-$(CONFIG_IMX_MBOX)	+= imx-mailbox.o
> > >
> > >  obj-$(CONFIG_ARMADA_37XX_RWTM_MBOX)	+=
> > armada-37xx-rwtm-mailbox.o
> > > diff --git a/drivers/mailbox/arm-smc-mailbox.c
> > > b/drivers/mailbox/arm-smc-mailbox.c
> > > new file mode 100644
> > > index 000000000000..fef6e38d8b98
> > > --- /dev/null
> > > +++ b/drivers/mailbox/arm-smc-mailbox.c
> > > @@ -0,0 +1,190 @@
> > > +// SPDX-License-Identifier: GPL-2.0
> > > +/*
> > > + * Copyright (C) 2016,2017 ARM Ltd.
> > > + * Copyright 2019 NXP
> > > + */
> > > +
> > > +#include <linux/arm-smccc.h>
> > > +#include <linux/device.h>
> > > +#include <linux/kernel.h>
> > > +#include <linux/interrupt.h>
> > > +#include <linux/mailbox_controller.h> #include
> > > +<linux/mailbox/arm-smc-mailbox.h>
> > > +#include <linux/module.h>
> > > +#include <linux/platform_device.h>
> > > +
> > > +#define ARM_SMC_MBOX_USE_HVC	BIT(0)
> > > +#define ARM_SMC_MBOX_USB_IRQ	BIT(1)
> > > +
> > > +struct arm_smc_chan_data {
> > > +	u32 function_id;
> > > +	u32 flags;
> > > +	int irq;
> > > +};
> > > +
> > > +static int arm_smc_send_data(struct mbox_chan *link, void *data) {
> > > +	struct arm_smc_chan_data *chan_data = link->con_priv;
> > > +	struct arm_smccc_mbox_cmd *cmd = data;
> > > +	struct arm_smccc_res res;
> > > +	u32 function_id;
> > > +
> > > +	if (chan_data->function_id != UINT_MAX)
> > > +		function_id = chan_data->function_id;
> > > +	else
> > > +		function_id = cmd->a0;
> > > +
> > > +	if (chan_data->flags & ARM_SMC_MBOX_USE_HVC)
> > > +		arm_smccc_hvc(function_id, cmd->a1, cmd->a2, cmd->a3,
> > cmd->a4,
> > > +			      cmd->a5, cmd->a6, cmd->a7, &res);
> > > +	else
> > > +		arm_smccc_smc(function_id, cmd->a1, cmd->a2, cmd->a3,
> > cmd->a4,
> > > +			      cmd->a5, cmd->a6, cmd->a7, &res);
> > > +
> >
> > So how will the SMC/HVC handler in EL3/2 find which mailbox is being
> > referred with this command ? I prefer 2nd argument to be the mailbox
> > number.
> You mean channel number as following?
>
> @@ -37,10 +38,10 @@ static int arm_smc_send_data(struct mbox_chan *link, void *data)
>                 function_id = cmd->a0;
>
>         if (chan_data->flags & ARM_SMC_MBOX_USE_HVC)
> -               arm_smccc_hvc(function_id, cmd->a1, cmd->a2, cmd->a3, cmd->a4,
> +               arm_smccc_hvc(function_id, chan_data->chan_id, cmd->a2, cmd->a3, cmd->a4,
>                               cmd->a5, cmd->a6, cmd->a7, &res);
>         else
> -               arm_smccc_smc(function_id, cmd->a1, cmd->a2, cmd->a3, cmd->a4,
> +               arm_smccc_smc(function_id, chan_data->chan_id, cmd->a2, cmd->a3, cmd->a4,
>                               cmd->a5, cmd->a6, cmd->a7, &res);
>

Yes something like above. There's a brief description of the same in
latest SCMI specification though it's not related to SCMI, it more 
general note for SMC based mailbox.

"In case the doorbell is SMC/HVC based, it should follow the SMC Calling
Convention [SMCCC] and needs to provide the identifier of the Shared Memory
area that contains the payload. On return from the call, the Shared Memory
area which contained the payload is now updated with the SCMI return response.
The identifier of the Shared Memory area should be 32-bits and each identifier
should denote a distinct Shared Memory area."

> Or should that be passed from firmware driver?
>

No, we can't assume the id's in DT are 1-1 translation to mailbox ID used
though it may be the same most of the time.

> If not from firmware driver, just as above, I do not have a good idea which
> should be passed to smc, from cmd->a1 to a5 or from cmd->a2 to a6.
>

Also I found copying those registers may not be always needed and can
be sub-optimal. May be a way to indicate that this in DT whether
register based transfers are used or using memory. Just a thought.

--
Regards,
Sudeep

^ permalink raw reply

* Re: [PATCH V2 2/2] mailbox: introduce ARM SMC based mailbox
From: Sudeep Holla @ 2019-06-20 11:15 UTC (permalink / raw)
  To: Peng Fan
  Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
	f.fainelli@gmail.com, festevam@gmail.com,
	jassisinghbrar@gmail.com, linux-kernel@vger.kernel.org,
	Sudeep Holla, robh+dt@kernel.org, dl-linux-imx,
	kernel@pengutronix.de, andre.przywara@arm.com,
	van.freenix@gmail.com, shawnguo@kernel.org,
	linux-arm-kernel@lists.infradead.org
In-Reply-To: <AM0PR04MB4481203DE76D290F311E3BFA88E40@AM0PR04MB4481.eurprd04.prod.outlook.com>

On Thu, Jun 20, 2019 at 10:21:09AM +0000, Peng Fan wrote:
> Hi Sudeep,
>
> > Subject: Re: [PATCH V2 2/2] mailbox: introduce ARM SMC based mailbox
> >
> > On Mon, Jun 03, 2019 at 04:30:05PM +0800, peng.fan@nxp.com wrote:
> > > From: Peng Fan <peng.fan@nxp.com>
> > >
> > > This mailbox driver implements a mailbox which signals transmitted
> > > data via an ARM smc (secure monitor call) instruction. The mailbox
> > > receiver is implemented in firmware and can synchronously return data
> > > when it returns execution to the non-secure world again.
> > > An asynchronous receive path is not implemented.
> > > This allows the usage of a mailbox to trigger firmware actions on SoCs
> > > which either don't have a separate management processor or on which
> > > such a core is not available. A user of this mailbox could be the SCP
> > > interface.
> > >
> > > Modified from Andre Przywara's v2 patch
> > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore
> > > .kernel.org%2Fpatchwork%2Fpatch%2F812999%2F&amp;data=02%7C01%7
> > Cpeng.fa
> > >
> > n%40nxp.com%7C6b37f78032e446be750e08d6f560e707%7C686ea1d3bc2b4
> > c6fa92cd
> > >
> > 99c5c301635%7C0%7C0%7C636966193913988679&amp;sdata=UNM4MTPs
> > brqoMqWStEy
> > > YzzwMEWTmX7hHO3TeNEz%2BOAw%3D&amp;reserved=0
> > >
> > > Cc: Andre Przywara <andre.przywara@arm.com>
> > > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > > ---
> > >
> > > V2:
> > >  Add interrupts notification support.
> > >
> > >  drivers/mailbox/Kconfig                 |   7 ++
> > >  drivers/mailbox/Makefile                |   2 +
> > >  drivers/mailbox/arm-smc-mailbox.c       | 190
> > ++++++++++++++++++++++++++++++++
> > >  include/linux/mailbox/arm-smc-mailbox.h |  10 ++
> > >  4 files changed, 209 insertions(+)
> > >  create mode 100644 drivers/mailbox/arm-smc-mailbox.c  create mode
> > > 100644 include/linux/mailbox/arm-smc-mailbox.h
> > >
> > > diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig index
> > > 595542bfae85..c3bd0f1ddcd8 100644
> > > --- a/drivers/mailbox/Kconfig
> > > +++ b/drivers/mailbox/Kconfig
> > > @@ -15,6 +15,13 @@ config ARM_MHU
> > >  	  The controller has 3 mailbox channels, the last of which can be
> > >  	  used in Secure mode only.
> > >
> > > +config ARM_SMC_MBOX
> > > +	tristate "Generic ARM smc mailbox"
> > > +	depends on OF && HAVE_ARM_SMCCC
> > > +	help
> > > +	  Generic mailbox driver which uses ARM smc calls to call into
> > > +	  firmware for triggering mailboxes.
> > > +
> > >  config IMX_MBOX
> > >  	tristate "i.MX Mailbox"
> > >  	depends on ARCH_MXC || COMPILE_TEST
> > > diff --git a/drivers/mailbox/Makefile b/drivers/mailbox/Makefile index
> > > c22fad6f696b..93918a84c91b 100644
> > > --- a/drivers/mailbox/Makefile
> > > +++ b/drivers/mailbox/Makefile
> > > @@ -7,6 +7,8 @@ obj-$(CONFIG_MAILBOX_TEST)	+= mailbox-test.o
> > >
> > >  obj-$(CONFIG_ARM_MHU)	+= arm_mhu.o
> > >
> > > +obj-$(CONFIG_ARM_SMC_MBOX)	+= arm-smc-mailbox.o
> > > +
> > >  obj-$(CONFIG_IMX_MBOX)	+= imx-mailbox.o
> > >
> > >  obj-$(CONFIG_ARMADA_37XX_RWTM_MBOX)	+=
> > armada-37xx-rwtm-mailbox.o
> > > diff --git a/drivers/mailbox/arm-smc-mailbox.c
> > > b/drivers/mailbox/arm-smc-mailbox.c
> > > new file mode 100644
> > > index 000000000000..fef6e38d8b98
> > > --- /dev/null
> > > +++ b/drivers/mailbox/arm-smc-mailbox.c
> > > @@ -0,0 +1,190 @@
> > > +// SPDX-License-Identifier: GPL-2.0
> > > +/*
> > > + * Copyright (C) 2016,2017 ARM Ltd.
> > > + * Copyright 2019 NXP
> > > + */
> > > +
> > > +#include <linux/arm-smccc.h>
> > > +#include <linux/device.h>
> > > +#include <linux/kernel.h>
> > > +#include <linux/interrupt.h>
> > > +#include <linux/mailbox_controller.h> #include
> > > +<linux/mailbox/arm-smc-mailbox.h>
> > > +#include <linux/module.h>
> > > +#include <linux/platform_device.h>
> > > +
> > > +#define ARM_SMC_MBOX_USE_HVC	BIT(0)
> > > +#define ARM_SMC_MBOX_USB_IRQ	BIT(1)
> > > +
> > > +struct arm_smc_chan_data {
> > > +	u32 function_id;
> > > +	u32 flags;
> > > +	int irq;
> > > +};
> > > +
> > > +static int arm_smc_send_data(struct mbox_chan *link, void *data) {
> > > +	struct arm_smc_chan_data *chan_data = link->con_priv;
> > > +	struct arm_smccc_mbox_cmd *cmd = data;
> > > +	struct arm_smccc_res res;
> > > +	u32 function_id;
> > > +
> > > +	if (chan_data->function_id != UINT_MAX)
> > > +		function_id = chan_data->function_id;
> > > +	else
> > > +		function_id = cmd->a0;
> > > +
> > > +	if (chan_data->flags & ARM_SMC_MBOX_USE_HVC)
> > > +		arm_smccc_hvc(function_id, cmd->a1, cmd->a2, cmd->a3,
> > cmd->a4,
> > > +			      cmd->a5, cmd->a6, cmd->a7, &res);
> > > +	else
> > > +		arm_smccc_smc(function_id, cmd->a1, cmd->a2, cmd->a3,
> > cmd->a4,
> > > +			      cmd->a5, cmd->a6, cmd->a7, &res);
> > > +
> >
> > So how will the SMC/HVC handler in EL3/2 find which mailbox is being
> > referred with this command ? I prefer 2nd argument to be the mailbox
> > number.
> You mean channel number as following?
>
> @@ -37,10 +38,10 @@ static int arm_smc_send_data(struct mbox_chan *link, void *data)
>                 function_id = cmd->a0;
>
>         if (chan_data->flags & ARM_SMC_MBOX_USE_HVC)
> -               arm_smccc_hvc(function_id, cmd->a1, cmd->a2, cmd->a3, cmd->a4,
> +               arm_smccc_hvc(function_id, chan_data->chan_id, cmd->a2, cmd->a3, cmd->a4,
>                               cmd->a5, cmd->a6, cmd->a7, &res);
>         else
> -               arm_smccc_smc(function_id, cmd->a1, cmd->a2, cmd->a3, cmd->a4,
> +               arm_smccc_smc(function_id, chan_data->chan_id, cmd->a2, cmd->a3, cmd->a4,
>                               cmd->a5, cmd->a6, cmd->a7, &res);
>

Yes something like above. There's a brief description of the same in
latest SCMI specification though it's not related to SCMI, it more 
general note for SMC based mailbox.

"In case the doorbell is SMC/HVC based, it should follow the SMC Calling
Convention [SMCCC] and needs to provide the identifier of the Shared Memory
area that contains the payload. On return from the call, the Shared Memory
area which contained the payload is now updated with the SCMI return response.
The identifier of the Shared Memory area should be 32-bits and each identifier
should denote a distinct Shared Memory area."

> Or should that be passed from firmware driver?
>

No, we can't assume the id's in DT are 1-1 translation to mailbox ID used
though it may be the same most of the time.

> If not from firmware driver, just as above, I do not have a good idea which
> should be passed to smc, from cmd->a1 to a5 or from cmd->a2 to a6.
>

Also I found copying those registers may not be always needed and can
be sub-optimal. May be a way to indicate that this in DT whether
register based transfers are used or using memory. Just a thought.

--
Regards,
Sudeep

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply

* [GIT PULL] MMC fixes for v5.2-rc6
From: Ulf Hansson @ 2019-06-20 11:16 UTC (permalink / raw)
  To: Linus, linux-mmc-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA
  Cc: Ulf Hansson, Douglas Anderson, Kalle Valo, Arend van Spriel,
	linux-wireless-u79uwXL29TY76Z2rM5mHXA, Adrian Hunter

Hi Linus,

Here's a PR with quite a few MMC fixes intended for v5.2-rc6. This time the PR
also contains fixes for a WiFi driver, which device is attached to the SDIO
interface. Patches for the WiFi driver have been acked by the corresponding
maintainers. More details about the highlights are as usual found in the signed
tag.

Please pull this in!

Kind regards
Ulf Hansson


The following changes since commit d1fdb6d8f6a4109a4263176c84b899076a5f8008:

  Linux 5.2-rc4 (2019-06-08 20:24:46 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git tags/mmc-v5.2-rc4

for you to fetch changes up to 83293386bc95cf5e9f0c0175794455835bd1cb4a:

  mmc: core: Prevent processing SDIO IRQs when the card is suspended (2019-06-18 14:06:32 +0200)

----------------------------------------------------------------
MMC core:
 - Make switch to eMMC HS400 more robust for some controllers
 - Add two SDIO func API to manage re-tuning constraints
 - Prevent processing SDIO IRQs when the card is suspended

MMC host:
 - sdhi: Disallow broken HS400 for M3-W ES1.2, RZ/G2M and V3H
 - mtk-sd: Fixup support for SDIO IRQs
 - sdhci-pci-o2micro: Fixup support for tuning

Wireless BRCMFMAC (SDIO):
 - Deal with expected transmission errors related to the idle states
   (handled by the Always-On-Subsystem or AOS) on the SDIO-based WiFi on
   rk3288-veyron-minnie, rk3288-veyron-speedy and rk3288-veyron-mickey.

----------------------------------------------------------------
Douglas Anderson (5):
      Revert "brcmfmac: disable command decode in sdio_aos"
      mmc: core: API to temporarily disable retuning for SDIO CRC errors
      brcmfmac: sdio: Disable auto-tuning around commands expected to fail
      mmc: core: Add sdio_retune_hold_now() and sdio_retune_release()
      brcmfmac: sdio: Don't tune while the card is off

Raul E Rangel (1):
      mmc: sdhci: sdhci-pci-o2micro: Correctly set bus width when tuning

Ulf Hansson (1):
      mmc: core: Prevent processing SDIO IRQs when the card is suspended

Wolfram Sang (2):
      mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H
      mmc: core: complete HS400 before checking status

jjian zhou (2):
      mmc: mediatek: fix SDIO IRQ interrupt handle flow
      mmc: mediatek: fix SDIO IRQ detection issue

 drivers/mmc/core/core.c                            |  5 +-
 drivers/mmc/core/mmc.c                             |  6 +-
 drivers/mmc/core/sdio.c                            | 13 +++-
 drivers/mmc/core/sdio_io.c                         | 77 ++++++++++++++++++++++
 drivers/mmc/core/sdio_irq.c                        |  4 ++
 drivers/mmc/host/mtk-sd.c                          | 39 ++++++-----
 drivers/mmc/host/renesas_sdhi_core.c               |  9 ++-
 drivers/mmc/host/sdhci-pci-o2micro.c               |  5 +-
 .../wireless/broadcom/brcm80211/brcmfmac/sdio.c    | 17 +++--
 include/linux/mmc/host.h                           |  1 +
 include/linux/mmc/sdio_func.h                      |  6 ++
 11 files changed, 151 insertions(+), 31 deletions(-)

^ permalink raw reply

* Re: [PATCH 3/3] ext4: use jbd2_inode dirty range scoping
From: Jan Kara @ 2019-06-20 11:15 UTC (permalink / raw)
  To: Ross Zwisler
  Cc: linux-kernel, Ross Zwisler, Theodore Ts'o, Alexander Viro,
	Andreas Dilger, Jan Kara, linux-ext4, linux-fsdevel, linux-mm,
	Fletcher Woodruff, Justin TerAvest
In-Reply-To: <20190619172156.105508-4-zwisler@google.com>

On Wed 19-06-19 11:21:56, Ross Zwisler wrote:
> Use the newly introduced jbd2_inode dirty range scoping to prevent us
> from waiting forever when trying to complete a journal transaction.
> 
> Signed-off-by: Ross Zwisler <zwisler@google.com>

Looks good to me. You can add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/ext4/ext4_jbd2.h   | 12 ++++++------
>  fs/ext4/inode.c       | 13 ++++++++++---
>  fs/ext4/move_extent.c |  3 ++-
>  3 files changed, 18 insertions(+), 10 deletions(-)
> 
> diff --git a/fs/ext4/ext4_jbd2.h b/fs/ext4/ext4_jbd2.h
> index 75a5309f22315..ef8fcf7d0d3b3 100644
> --- a/fs/ext4/ext4_jbd2.h
> +++ b/fs/ext4/ext4_jbd2.h
> @@ -361,20 +361,20 @@ static inline int ext4_journal_force_commit(journal_t *journal)
>  }
>  
>  static inline int ext4_jbd2_inode_add_write(handle_t *handle,
> -					    struct inode *inode)
> +		struct inode *inode, loff_t start_byte, loff_t length)
>  {
>  	if (ext4_handle_valid(handle))
> -		return jbd2_journal_inode_add_write(handle,
> -						    EXT4_I(inode)->jinode);
> +		return jbd2_journal_inode_ranged_write(handle,
> +				EXT4_I(inode)->jinode, start_byte, length);
>  	return 0;
>  }
>  
>  static inline int ext4_jbd2_inode_add_wait(handle_t *handle,
> -					   struct inode *inode)
> +		struct inode *inode, loff_t start_byte, loff_t length)
>  {
>  	if (ext4_handle_valid(handle))
> -		return jbd2_journal_inode_add_wait(handle,
> -						   EXT4_I(inode)->jinode);
> +		return jbd2_journal_inode_ranged_wait(handle,
> +				EXT4_I(inode)->jinode, start_byte, length);
>  	return 0;
>  }
>  
> diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
> index c7f77c6430085..27fec5c594459 100644
> --- a/fs/ext4/inode.c
> +++ b/fs/ext4/inode.c
> @@ -731,10 +731,16 @@ int ext4_map_blocks(handle_t *handle, struct inode *inode,
>  		    !(flags & EXT4_GET_BLOCKS_ZERO) &&
>  		    !ext4_is_quota_file(inode) &&
>  		    ext4_should_order_data(inode)) {
> +			loff_t start_byte =
> +				(loff_t)map->m_lblk << inode->i_blkbits;
> +			loff_t length = (loff_t)map->m_len << inode->i_blkbits;
> +
>  			if (flags & EXT4_GET_BLOCKS_IO_SUBMIT)
> -				ret = ext4_jbd2_inode_add_wait(handle, inode);
> +				ret = ext4_jbd2_inode_add_wait(handle, inode,
> +						start_byte, length);
>  			else
> -				ret = ext4_jbd2_inode_add_write(handle, inode);
> +				ret = ext4_jbd2_inode_add_write(handle, inode,
> +						start_byte, length);
>  			if (ret)
>  				return ret;
>  		}
> @@ -4085,7 +4091,8 @@ static int __ext4_block_zero_page_range(handle_t *handle,
>  		err = 0;
>  		mark_buffer_dirty(bh);
>  		if (ext4_should_order_data(inode))
> -			err = ext4_jbd2_inode_add_write(handle, inode);
> +			err = ext4_jbd2_inode_add_write(handle, inode, from,
> +					length);
>  	}
>  
>  unlock:
> diff --git a/fs/ext4/move_extent.c b/fs/ext4/move_extent.c
> index 1083a9f3f16a1..c7ded4e2adff5 100644
> --- a/fs/ext4/move_extent.c
> +++ b/fs/ext4/move_extent.c
> @@ -390,7 +390,8 @@ move_extent_per_page(struct file *o_filp, struct inode *donor_inode,
>  
>  	/* Even in case of data=writeback it is reasonable to pin
>  	 * inode to transaction, to prevent unexpected data loss */
> -	*err = ext4_jbd2_inode_add_write(handle, orig_inode);
> +	*err = ext4_jbd2_inode_add_write(handle, orig_inode,
> +			(loff_t)orig_page_offset << PAGE_SHIFT, replaced_size);
>  
>  unlock_pages:
>  	unlock_page(pagep[0]);
> -- 
> 2.22.0.410.gd8fdbe21b5-goog
> 
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply

* [GIT PULL] MMC fixes for v5.2-rc6
From: Ulf Hansson @ 2019-06-20 11:16 UTC (permalink / raw)
  To: Linus, linux-mmc, linux-kernel
  Cc: Ulf Hansson, Douglas Anderson, Kalle Valo, Arend van Spriel,
	linux-wireless, Adrian Hunter

Hi Linus,

Here's a PR with quite a few MMC fixes intended for v5.2-rc6. This time the PR
also contains fixes for a WiFi driver, which device is attached to the SDIO
interface. Patches for the WiFi driver have been acked by the corresponding
maintainers. More details about the highlights are as usual found in the signed
tag.

Please pull this in!

Kind regards
Ulf Hansson


The following changes since commit d1fdb6d8f6a4109a4263176c84b899076a5f8008:

  Linux 5.2-rc4 (2019-06-08 20:24:46 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc.git tags/mmc-v5.2-rc4

for you to fetch changes up to 83293386bc95cf5e9f0c0175794455835bd1cb4a:

  mmc: core: Prevent processing SDIO IRQs when the card is suspended (2019-06-18 14:06:32 +0200)

----------------------------------------------------------------
MMC core:
 - Make switch to eMMC HS400 more robust for some controllers
 - Add two SDIO func API to manage re-tuning constraints
 - Prevent processing SDIO IRQs when the card is suspended

MMC host:
 - sdhi: Disallow broken HS400 for M3-W ES1.2, RZ/G2M and V3H
 - mtk-sd: Fixup support for SDIO IRQs
 - sdhci-pci-o2micro: Fixup support for tuning

Wireless BRCMFMAC (SDIO):
 - Deal with expected transmission errors related to the idle states
   (handled by the Always-On-Subsystem or AOS) on the SDIO-based WiFi on
   rk3288-veyron-minnie, rk3288-veyron-speedy and rk3288-veyron-mickey.

----------------------------------------------------------------
Douglas Anderson (5):
      Revert "brcmfmac: disable command decode in sdio_aos"
      mmc: core: API to temporarily disable retuning for SDIO CRC errors
      brcmfmac: sdio: Disable auto-tuning around commands expected to fail
      mmc: core: Add sdio_retune_hold_now() and sdio_retune_release()
      brcmfmac: sdio: Don't tune while the card is off

Raul E Rangel (1):
      mmc: sdhci: sdhci-pci-o2micro: Correctly set bus width when tuning

Ulf Hansson (1):
      mmc: core: Prevent processing SDIO IRQs when the card is suspended

Wolfram Sang (2):
      mmc: sdhi: disallow HS400 for M3-W ES1.2, RZ/G2M, and V3H
      mmc: core: complete HS400 before checking status

jjian zhou (2):
      mmc: mediatek: fix SDIO IRQ interrupt handle flow
      mmc: mediatek: fix SDIO IRQ detection issue

 drivers/mmc/core/core.c                            |  5 +-
 drivers/mmc/core/mmc.c                             |  6 +-
 drivers/mmc/core/sdio.c                            | 13 +++-
 drivers/mmc/core/sdio_io.c                         | 77 ++++++++++++++++++++++
 drivers/mmc/core/sdio_irq.c                        |  4 ++
 drivers/mmc/host/mtk-sd.c                          | 39 ++++++-----
 drivers/mmc/host/renesas_sdhi_core.c               |  9 ++-
 drivers/mmc/host/sdhci-pci-o2micro.c               |  5 +-
 .../wireless/broadcom/brcm80211/brcmfmac/sdio.c    | 17 +++--
 include/linux/mmc/host.h                           |  1 +
 include/linux/mmc/sdio_func.h                      |  6 ++
 11 files changed, 151 insertions(+), 31 deletions(-)

^ permalink raw reply

* Re: [igt-dev] [PATCH i-g-t 5/5] docs: Embed subtest descriptions in the documentation
From: Arkadiusz Hiler @ 2019-06-20 11:16 UTC (permalink / raw)
  To: Ser, Simon; +Cc: igt-dev@lists.freedesktop.org, daniel@ffwll.ch
In-Reply-To: <c64168c1f87f13391bc136c83aefd0b3f32f725f.camel@intel.com>

On Thu, Jun 20, 2019 at 02:05:34PM +0300, Ser, Simon wrote:
> On Thu, 2019-06-20 at 13:52 +0300, Arkadiusz Hiler wrote:
> > On Thu, Jun 20, 2019 at 11:20:18AM +0300, Petri Latvala wrote:
> > > On Mon, Jun 17, 2019 at 01:54:43PM +0300, Arkadiusz Hiler wrote:
> > > > This rewrites generate_description_xml in Python, so that we generate
> > > > properly escaped XML. The switch also makes the code more manageable.
> > > > 
> > > > Changes in the generated docbook:
> > > > 
> > > > 1. subtests are not simply listed anymore, they are now another (sub)section
> > > > 
> > > > 2. subtests are now linkable,
> > > >    e.g. docs/igt-kms-tests.html#kms_hdmi_inject@inject-4k
> > > > 
> > > > 3. subtest's section now includes output of --describe
> > > > 
> > > > Python is required already by gtk-doc and we are not using anything
> > > > other than the standard library.
> > > 
> > > Python yes, but what about python3? My Debian installation is ancient
> > > even on Debian standards and gtk-doc-tools depends on python2. I'm too
> > > lazy to check if the version used by gitlab-CI depends on python3, so
> > > asking instead: Do you have a fork in gitlab for this? :P
> > 
> > It works on Fedora:
> > 
> > % head -n 1 $(which gtkdoc-mkhtml)
> > #!/usr/bin/python3
> 
> I believe `#!/usr/bin/env python3` is more correct.

Tell that to the gtkdoc (or package) maintainers :-)

-- 
Cheers,
Arek
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply

* Re: [PATCH] ARM: davinci: Use GPIO lookup table for DA850 LEDs
From: Sekhar Nori @ 2019-06-20 11:16 UTC (permalink / raw)
  To: Bartosz Golaszewski, Linus Walleij; +Cc: Bartosz Golaszewski, Linux ARM
In-Reply-To: <CAMRc=MdHUhZNuDKKdTnUGVm8h1rPoJYiei+WMvTVCXVHjmTRng@mail.gmail.com>

On 07/06/19 2:34 PM, Bartosz Golaszewski wrote:
> sob., 1 cze 2019 o 00:43 Linus Walleij <linus.walleij@linaro.org> napisał(a):
>>
>> This switches the DA850 board to use a GPIO lookup table to
>> look up the GPIO LEDs. Thanks to the offset handling when
>> we define GPIOs as an offset into the chip, we can drop
>> some complex code.
>>
>> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
>> ---
>> Sekhar, Bartosz: I had this patch sitting around in my
>> tree, can any of you test it and/or apply it? The
>> prerequisite patch naming the GPIO expander properly
>> after .dev_name was commited a while back.
>> ---
>>  arch/arm/mach-davinci/board-da850-evm.c | 43 +++++++++++++------------
>>  1 file changed, 22 insertions(+), 21 deletions(-)
>>
>> diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c
>> index 4ee65a8a3b80..acf3013f4ae5 100644
>> --- a/arch/arm/mach-davinci/board-da850-evm.c
>> +++ b/arch/arm/mach-davinci/board-da850-evm.c
>> @@ -631,13 +631,12 @@ static void da850_evm_bb_keys_init(unsigned gpio)
>>         }
>>  }
>>
>> -#define DA850_N_BB_USER_LED    2
>> -
>>  static struct gpio_led da850_evm_bb_leds[] = {
>> -       [0 ... DA850_N_BB_USER_LED - 1] = {
>> -               .active_low = 1,
>> -               .gpio = -1, /* assigned at runtime */
>> -               .name = NULL, /* assigned at runtime */
>> +       {
>> +               .name = "user_led2",
>> +       },
>> +       {
>> +               .name = "user_led1",
>>         },
>>  };
>>
>> @@ -646,6 +645,20 @@ static struct gpio_led_platform_data da850_evm_bb_leds_pdata = {
>>         .num_leds = ARRAY_SIZE(da850_evm_bb_leds),
>>  };
>>
>> +static struct gpiod_lookup_table da850_evm_bb_leds_gpio_table = {
>> +       .dev_id = "leds-gpio",
>> +       .table = {
>> +               GPIO_LOOKUP_IDX("i2c-bb-expander",
>> +                               DA850_EVM_BB_EXP_USER_LED2, NULL,
>> +                               0, GPIO_ACTIVE_LOW),
>> +               GPIO_LOOKUP_IDX("i2c-bb-expander",
>> +                               DA850_EVM_BB_EXP_USER_LED2 + 1, NULL,
>> +                               1, GPIO_ACTIVE_LOW),
>> +
>> +               { },
>> +       },
>> +};
>> +
>>  static struct platform_device da850_evm_bb_leds_device = {
>>         .name           = "leds-gpio",
>>         .id             = -1,
>> @@ -654,20 +667,6 @@ static struct platform_device da850_evm_bb_leds_device = {
>>         }
>>  };
>>
>> -static void da850_evm_bb_leds_init(unsigned gpio)
>> -{
>> -       int i;
>> -       struct gpio_led *led;
>> -
>> -       for (i = 0; i < DA850_N_BB_USER_LED; i++) {
>> -               led = &da850_evm_bb_leds[i];
>> -
>> -               led->gpio = gpio + DA850_EVM_BB_EXP_USER_LED2 + i;
>> -               led->name =
>> -                       da850_evm_bb_exp[DA850_EVM_BB_EXP_USER_LED2 + i];
>> -       }
>> -}
>> -
>>  static int da850_evm_bb_expander_setup(struct i2c_client *client,
>>                                                 unsigned gpio, unsigned ngpio,
>>                                                 void *c)
>> @@ -685,7 +684,7 @@ static int da850_evm_bb_expander_setup(struct i2c_client *client,
>>                 goto io_exp_setup_sw_fail;
>>         }
>>
>> -       da850_evm_bb_leds_init(gpio);
>> +       gpiod_add_lookup_table(&da850_evm_bb_leds_gpio_table);
>>         ret = platform_device_register(&da850_evm_bb_leds_device);
>>         if (ret) {
>>                 pr_warn("Could not register baseboard GPIO expander LEDs");
>> @@ -729,10 +728,12 @@ static struct i2c_board_info __initdata da850_evm_i2c_devices[] = {
>>         },
>>         {
>>                 I2C_BOARD_INFO("tca6416", 0x20),
>> +               .dev_name = "ui-expander",
>>                 .platform_data = &da850_evm_ui_expander_info,
>>         },
>>         {
>>                 I2C_BOARD_INFO("tca6416", 0x21),
>> +               .dev_name = "bb-expander",
>>                 .platform_data = &da850_evm_bb_expander_info,
>>         },
>>  };
>> --
>> 2.20.1
>>
>>
> 
> Expander now probes with my patch[1] applied.
> 
> This patch looks good and LEDs still work.
> 
> Tested-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> Reviewed-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> [1] https://patchwork.kernel.org/patch/10981093/

Patch applied and pull request for v5.3 sent.

Thanks,
Sekhar

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply

* Re: [RESEND PATCH v5 0/5] ARM: da850: enable cpufreq in DT mode
From: Sekhar Nori @ 2019-06-20 11:17 UTC (permalink / raw)
  To: Bartosz Golaszewski, Kevin Hilman, Rob Herring, Mark Rutland,
	David Lechner, Adam Ford
  Cc: linux-arm-kernel, devicetree, linux-kernel, Bartosz Golaszewski
In-Reply-To: <20190527082259.29237-1-brgl@bgdev.pl>

On 27/05/19 1:52 PM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> Note: resending rebased on top of v5.2-rc2
> 
> ===
> 
> This series adds cpufreq-dt operating points for da850 boards supported
> with device tree (da850-lcdk, da850-lego-ev3, da850-evm).
> 
> Last patch enables CPUFREQ_DT in davinci_all_defconfig.

Series applied and pull request sent for v5.3

Thanks,
Sekhar

^ permalink raw reply

* possible deadlock in console_lock_spinning_enable
From: syzbot @ 2019-06-20 11:17 UTC (permalink / raw)
  To: gregkh, jslaby, linux-kernel, syzkaller-bugs, threeearcat

Hello,

syzbot found the following crash on:

HEAD commit:    bed3c0d8 Merge tag 'for-5.2-rc5-tag' of git://git.kernel.o..
git tree:       upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=175d674ea00000
kernel config:  https://syzkaller.appspot.com/x/.config?x=28ec3437a5394ee0
dashboard link: https://syzkaller.appspot.com/bug?extid=3ed715090790806d8b18
compiler:       clang version 9.0.0 (/home/glider/llvm/clang  
80fee25776c2fb61e74c1ecb1a523375c2500b69)
syz repro:      https://syzkaller.appspot.com/x/repro.syz?x=174ae381a00000
C reproducer:   https://syzkaller.appspot.com/x/repro.c?x=1490948aa00000

The bug was bisected to:

commit b6da31b2c07c46f2dcad1d86caa835227a16d9ff
Author: DaeRyong Jeong <threeearcat@gmail.com>
Date:   Mon Apr 30 15:27:04 2018 +0000

     tty: Fix data race in tty_insert_flip_string_fixed_flag

bisection log:  https://syzkaller.appspot.com/x/bisect.txt?x=146590e6a00000
final crash:    https://syzkaller.appspot.com/x/report.txt?x=166590e6a00000
console output: https://syzkaller.appspot.com/x/log.txt?x=126590e6a00000

IMPORTANT: if you fix the bug, please add the following tag to the commit:
Reported-by: syzbot+3ed715090790806d8b18@syzkaller.appspotmail.com
Fixes: b6da31b2c07c ("tty: Fix data race in  
tty_insert_flip_string_fixed_flag")

======================================================
WARNING: possible circular locking dependency detected
5.2.0-rc5+ #3 Not tainted
------------------------------------------------------
syz-executor423/8208 is trying to acquire lock:
0000000094bc2798 (console_owner){-.-.}, at:  
console_lock_spinning_enable+0x31/0x60 kernel/printk/printk.c:1641

but task is already holding lock:
0000000007643134 (&(&port->lock)->rlock){-.-.}, at: pty_write+0xbd/0x190  
drivers/tty/pty.c:120

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #2 (&(&port->lock)->rlock){-.-.}:
        __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
        _raw_spin_lock_irqsave+0xa1/0xc0 kernel/locking/spinlock.c:159
        tty_port_tty_get drivers/tty/tty_port.c:287 [inline]
        tty_port_default_wakeup+0x20/0xa0 drivers/tty/tty_port.c:47
        tty_port_tty_wakeup+0x5a/0x70 drivers/tty/tty_port.c:387
        uart_write_wakeup+0x48/0x60 drivers/tty/serial/serial_core.c:103
        serial8250_tx_chars+0x623/0x830  
drivers/tty/serial/8250/8250_port.c:1806
        serial8250_handle_irq+0x255/0x390  
drivers/tty/serial/8250/8250_port.c:1879
        serial8250_default_handle_irq+0xc5/0x1d0  
drivers/tty/serial/8250/8250_port.c:1895
        serial8250_interrupt+0xad/0x190  
drivers/tty/serial/8250/8250_core.c:125
        __handle_irq_event_percpu+0x113/0x560 kernel/irq/handle.c:149
        handle_irq_event_percpu kernel/irq/handle.c:189 [inline]
        handle_irq_event+0x10a/0x2f0 kernel/irq/handle.c:206
        handle_edge_irq+0x29f/0xca0 kernel/irq/chip.c:822
        generic_handle_irq_desc include/linux/irqdesc.h:156 [inline]
        handle_irq+0x3e/0x50 arch/x86/kernel/irq_64.c:34
        do_IRQ+0xc4/0x1a0 arch/x86/kernel/irq.c:247
        ret_from_intr+0x0/0x1e
        native_safe_halt+0xe/0x10 arch/x86/include/asm/irqflags.h:60
        arch_cpu_idle+0xa/0x10 arch/x86/kernel/process.c:571
        default_idle_call kernel/sched/idle.c:94 [inline]
        cpuidle_idle_call kernel/sched/idle.c:154 [inline]
        do_idle+0x18a/0x760 kernel/sched/idle.c:263
        cpu_startup_entry+0x25/0x30 kernel/sched/idle.c:354
        start_secondary+0x425/0x4c0 arch/x86/kernel/smpboot.c:265
        secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243

-> #1 (&port_lock_key){-.-.}:
        __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
        _raw_spin_lock_irqsave+0xa1/0xc0 kernel/locking/spinlock.c:159
        serial8250_console_write+0x1d1/0xba0  
drivers/tty/serial/8250/8250_port.c:3245
        univ8250_console_write+0x50/0x70  
drivers/tty/serial/8250/8250_core.c:586
        call_console_drivers kernel/printk/printk.c:1779 [inline]
        console_unlock+0x95f/0xf20 kernel/printk/printk.c:2463
        vprintk_emit+0x239/0x3a0 kernel/printk/printk.c:1986
        vprintk_default+0x28/0x30 kernel/printk/printk.c:2013
        vprintk_func+0x158/0x170 kernel/printk/printk_safe.c:386
        printk+0xc4/0x11d kernel/printk/printk.c:2046
        register_console+0xa81/0xe30 kernel/printk/printk.c:2788
        univ8250_console_init+0x4b/0x4d  
drivers/tty/serial/8250/8250_core.c:681
        console_init+0x56/0x9c kernel/printk/printk.c:2874
        start_kernel+0x49e/0x860 init/main.c:688
        x86_64_start_reservations+0x18/0x2e arch/x86/kernel/head64.c:470
        x86_64_start_kernel+0x7a/0x7d arch/x86/kernel/head64.c:451
        secondary_startup_64+0xa4/0xb0 arch/x86/kernel/head_64.S:243

-> #0 (console_owner){-.-.}:
        lock_acquire+0x158/0x250 kernel/locking/lockdep.c:4303
        console_lock_spinning_enable+0x56/0x60 kernel/printk/printk.c:1644
        console_unlock+0x79f/0xf20 kernel/printk/printk.c:2460
        vprintk_emit+0x239/0x3a0 kernel/printk/printk.c:1986
        vprintk_default+0x28/0x30 kernel/printk/printk.c:2013
        vprintk_func+0x158/0x170 kernel/printk/printk_safe.c:386
        printk+0xc4/0x11d kernel/printk/printk.c:2046
        fail_dump lib/fault-inject.c:45 [inline]
        should_fail+0x5c5/0x860 lib/fault-inject.c:144
        __should_failslab+0x11a/0x160 mm/failslab.c:32
        should_failslab+0x9/0x20 mm/slab_common.c:1610
        slab_pre_alloc_hook mm/slab.h:420 [inline]
        slab_alloc mm/slab.c:3312 [inline]
        __do_kmalloc mm/slab.c:3658 [inline]
        __kmalloc+0x7a/0x310 mm/slab.c:3669
        kmalloc include/linux/slab.h:552 [inline]
        tty_buffer_alloc drivers/tty/tty_buffer.c:175 [inline]
        __tty_buffer_request_room+0x1ef/0x560 drivers/tty/tty_buffer.c:273
        tty_insert_flip_string_fixed_flag+0xa4/0x2b0  
drivers/tty/tty_buffer.c:318
        tty_insert_flip_string include/linux/tty_flip.h:37 [inline]
        pty_write+0xe2/0x190 drivers/tty/pty.c:122
        n_tty_write+0x5f5/0x12d0 drivers/tty/n_tty.c:2356
        do_tty_write drivers/tty/tty_io.c:961 [inline]
        tty_write+0x581/0x860 drivers/tty/tty_io.c:1045
        __vfs_write+0xf9/0x7d0 fs/read_write.c:494
        vfs_write+0x227/0x510 fs/read_write.c:558
        ksys_write+0x16b/0x2a0 fs/read_write.c:611
        __do_sys_write fs/read_write.c:623 [inline]
        __se_sys_write fs/read_write.c:620 [inline]
        __x64_sys_write+0x7b/0x90 fs/read_write.c:620
        do_syscall_64+0xfe/0x140 arch/x86/entry/common.c:301
        entry_SYSCALL_64_after_hwframe+0x49/0xbe

other info that might help us debug this:

Chain exists of:
   console_owner --> &port_lock_key --> &(&port->lock)->rlock

  Possible unsafe locking scenario:

        CPU0                    CPU1
        ----                    ----
   lock(&(&port->lock)->rlock);
                                lock(&port_lock_key);
                                lock(&(&port->lock)->rlock);
   lock(console_owner);

  *** DEADLOCK ***

6 locks held by syz-executor423/8208:
  #0: 00000000cef2c391 (&tty->ldisc_sem){++++}, at:  
tty_ldisc_ref_wait+0x25/0x70 drivers/tty/tty_ldisc.c:272
  #1: 00000000a7608faf (&tty->atomic_write_lock){+.+.}, at: tty_write_lock  
drivers/tty/tty_io.c:887 [inline]
  #1: 00000000a7608faf (&tty->atomic_write_lock){+.+.}, at: do_tty_write  
drivers/tty/tty_io.c:910 [inline]
  #1: 00000000a7608faf (&tty->atomic_write_lock){+.+.}, at:  
tty_write+0x21d/0x860 drivers/tty/tty_io.c:1045
  #2: 00000000c1195898 (&tty->termios_rwsem){++++}, at:  
n_tty_write+0x22e/0x12d0 drivers/tty/n_tty.c:2316
  #3: 00000000fc5a138e (&ldata->output_lock){+.+.}, at:  
n_tty_write+0x5a9/0x12d0 drivers/tty/n_tty.c:2355
  #4: 0000000007643134 (&(&port->lock)->rlock){-.-.}, at:  
pty_write+0xbd/0x190 drivers/tty/pty.c:120
  #5: 00000000a1673955 (console_lock){+.+.}, at: vprintk_emit+0x21c/0x3a0  
kernel/printk/printk.c:1985

stack backtrace:
CPU: 1 PID: 8208 Comm: syz-executor423 Not tainted 5.2.0-rc5+ #3
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS  
Google 01/01/2011
Call Trace:
  __dump_stack lib/dump_stack.c:77 [inline]
  dump_stack+0x1d8/0x2f8 lib/dump_stack.c:113
  print_circular_bug+0xd34/0xf20 kernel/locking/lockdep.c:1564
  check_prev_add kernel/locking/lockdep.c:2310 [inline]
  check_prevs_add kernel/locking/lockdep.c:2418 [inline]
  validate_chain+0x59d0/0x84f0 kernel/locking/lockdep.c:2800
  __lock_acquire+0xcf7/0x1a40 kernel/locking/lockdep.c:3793
  lock_acquire+0x158/0x250 kernel/locking/lockdep.c:4303
  console_lock_spinning_enable+0x56/0x60 kernel/printk/printk.c:1644
  console_unlock+0x79f/0xf20 kernel/printk/printk.c:2460
  vprintk_emit+0x239/0x3a0 kernel/printk/printk.c:1986
  vprintk_default+0x28/0x30 kernel/printk/printk.c:2013
  vprintk_func+0x158/0x170 kernel/printk/printk_safe.c:386
  printk+0xc4/0x11d kernel/printk/printk.c:2046
  fail_dump lib/fault-inject.c:45 [inline]
  should_fail+0x5c5/0x860 lib/fault-inject.c:144
  __should_failslab+0x11a/0x160 mm/failslab.c:32
  should_failslab+0x9/0x20 mm/slab_common.c:1610
  slab_pre_alloc_hook mm/slab.h:420 [inline]
  slab_alloc mm/slab.c:3312 [inline]
  __do_kmalloc mm/slab.c:3658 [inline]
  __kmalloc+0x7a/0x310 mm/slab.c:3669
  kmalloc include/linux/slab.h:552 [inline]
  tty_buffer_alloc drivers/tty/tty_buffer.c:175 [inline]
  __tty_buffer_request_room+0x1ef/0x560 drivers/tty/tty_buffer.c:273
  tty_insert_flip_string_fixed_flag+0xa4/0x2b0 drivers/tty/tty_buffer.c:318
  tty_insert_flip_string include/linux/tty_flip.h:37 [inline]
  pty_write+0xe2/0x190 drivers/tty/pty.c:122
  n_tty_write+0x5f5/0x12d0 drivers/tty/n_tty.c:2356
  do_tty_write drivers/tty/tty_io.c:961 [inline]
  tty_write+0x581/0x860 drivers/tty/tty_io.c:1045
  __vfs_write+0xf9/0x7d0 fs/read_write.c:494
  vfs_write+0x227/0x510 fs/read_write.c:558
  ksys_write+0x16b/0x2a0 fs/read_write.c:611
  __do_sys_write fs/read_write.c:623 [inline]
  __se_sys_write fs/read_write.c:620 [inline]
  __x64_sys_write+0x7b/0x90 fs/read_write.c:620
  do_syscall_64+0xfe/0x140 arch/x86/entry/common.c:301
  entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x4404c9
Code: 18 89 d0 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 00 48 89 f8 48 89 f7  
48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff  
ff 0f 83 5b 14 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffd67920e98 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007ffd67920ea0 RCX: 00000000004404c9
RDX: 00000000ffffff78 RSI: 00000000200000c0 RDI: 0000000000000003
RBP: 0000000000000004 R08: 0000000000000001 R09: 00007ffd67920032
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000401db0
R13: 0000000000401e40 R14: 0000000000000000 R15: 0000000000000000


---
This bug is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller@googlegroups.com.

syzbot will keep track of this bug report. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
syzbot can test patches for this bug, for details see:
https://goo.gl/tpsmEJ#testing-patches

^ permalink raw reply

* [PATCH RFC] kvm: x86: AVX512_BF16 feature support
From: Jing Liu @ 2019-06-20 11:21 UTC (permalink / raw)
  To: pbonzini, kvm; +Cc: linux-kernel, jing2.liu, jing2.liu

The patch focuses on a new instruction AVX512_BF16 support for kvm guest, defined
as CPUID.(EAX=7,ECX=1):EAX[bit 5], see spec[1].

The kvm implementation depends on kernel patch[2] which is in lkml discussion.

References:
[1] https://software.intel.com/sites/default/files/managed/c5/15/\
    architecture-instruction-set-extensions-programming-reference.pdf
[2] https://lkml.org/lkml/2019/6/19/912

Jing Liu (1):
  kvm: x86: Expose AVX512_BF16 feature to guest

 arch/x86/kvm/cpuid.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

-- 
1.8.3.1


^ permalink raw reply

* Re: [Qemu-riscv] TLB refresh issue
From: Quentin Mundell @ 2019-06-20 10:27 UTC (permalink / raw)
  To: qemu-riscv@nongnu.org
In-Reply-To: <2tpMqWtbo4E8ZRuLZ07ldGITU5rCPpdyvW0lS1kGTDly5GhRUmbSuvepoodO5KZVHXnejpSHJuujarzlF3HcWccYYVn6p2wFNV7thu9rnFo=@protonmail.com>

[-- Attachment #1: Type: text/plain, Size: 2815 bytes --]

Upon further inspection, I finally found an issue with my sapt/fence/asid logic.

Thank you Jonathan for pointing me to https://github.com/qemu/qemu/commit/1e0d985fa9136a563168a3da66f3d17820404ee2 !

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Thursday, June 20, 2019 11:32 AM, Quentin Mundell <quentin.mundell@protonmail.com> wrote:

> Sorry, there was a typo in the commit hash, here is the good one: https://github.com/qemu/qemu/commit/c7b951718815694284501ed01fec7acb8654db7b#diff-f5f017ee174677b23830531cab545e78L531
>
> I have double checked my vma fences and I think the logic behind is correct (I only flush when needed with regard to ASIDs).
> As a test, I have added a full `sfence.vma` barrier after every `satp` write: I still have the same random crashes.
>
> QM.
>
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Wednesday, June 19, 2019 7:30 PM, Jonathan Behrens <fintelia@gmail.com> wrote:
>
>> I wasn't able to find the commit you bisected to, but is your code executing a `sfence.vma` instruction after every instance that it changes satp? Until recently this wasn't necessary with QEMU because QEMU flushed the TLB more aggressively than required by the spec, but [the behavior was chayou are referringnged in a recent commit](https://github.com/qemu/qemu/commit/1e0d985fa9136a563168a3da66f3d17820404ee2#diff-243969738b77de10c014622a3d749a44).
>>
>> Jonathan
>>
>> On Wed, Jun 19, 2019 at 11:46 AM Quentin Mundell via Qemu-riscv <qemu-riscv@nongnu.org> wrote:
>>
>>> Hello,
>>>
>>> I have updated my QEMU version (from 3.x to today's master).
>>> I now get all sort of weird and not easily reproducible exceptions triggered in my risc-v guest, happening from both user and supervisor mode.
>>>
>>> The command I use is roughly `qemu-system-riscv64 -machine sifive_u -m 1024 -kernel mybinary.elf` (sorry, I cannot share the elf).
>>>
>>> I have bisected this issue back to commit c7b95171881569284501ed01fec7acb8654db7b.
>>> Some TLB flushes were removed in the following places:
>>> target/riscv/cpu_helper.c: `csr_write_helper(env, s, CSR_MSTATUS);` -> `env->mstatus = s;` (twice)
>>> target/riscv/op_helper.c: `csr_write_helper(env, s, CSR_MSTATUS);` -> `env->mstatus = s;` (twice)
>>> These are the places where the privileged mode is switched.
>>>
>>> If I add them back (`tlb_flush(env_cpu(env));`), everything is fine again.
>>>
>>> However, in the `riscv_cpu_set_mode` function, I see the following comment:
>>>> tlb_flush is unnecessary as mode is contained in mmu_idx
>>> It would suggest adding back TLB flushes is not the way to go...
>>>
>>> Does someone with better knowledge of the codebase can tell me how to proceed here?
>>> - Should I submit a patch adding back the TLB flushes?
>>> - Is it an issue somewhere else?
>>>
>>> Regards
>>> QM

[-- Attachment #2: Type: text/html, Size: 4068 bytes --]

^ permalink raw reply

* Re: [RESEND PATCH v5 0/5] ARM: da850: enable cpufreq in DT mode
From: Sekhar Nori @ 2019-06-20 11:17 UTC (permalink / raw)
  To: Bartosz Golaszewski, Kevin Hilman, Rob Herring, Mark Rutland,
	David Lechner, Adam Ford
  Cc: linux-arm-kernel, devicetree, linux-kernel, Bartosz Golaszewski
In-Reply-To: <20190527082259.29237-1-brgl@bgdev.pl>

On 27/05/19 1:52 PM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> Note: resending rebased on top of v5.2-rc2
> 
> ===
> 
> This series adds cpufreq-dt operating points for da850 boards supported
> with device tree (da850-lcdk, da850-lego-ev3, da850-evm).
> 
> Last patch enables CPUFREQ_DT in davinci_all_defconfig.

Series applied and pull request sent for v5.3

Thanks,
Sekhar

^ permalink raw reply

* [PATCH RFC] kvm: x86: Expose AVX512_BF16 feature to guest
From: Jing Liu @ 2019-06-20 11:21 UTC (permalink / raw)
  To: pbonzini, kvm; +Cc: linux-kernel, jing2.liu, jing2.liu
In-Reply-To: <1561029712-11848-1-git-send-email-jing2.liu@linux.intel.com>

AVX512 BFLOAT16 instructions support 16-bit BFLOAT16 floating-point
format (BF16) for deep learning optimization.

Intel adds AVX512 BFLOAT16 feature in CooperLake, which is CPUID.7.1.EAX[5].

Detailed information of the CPUID bit can be found here,
https://software.intel.com/sites/default/files/managed/c5/15/\
architecture-instruction-set-extensions-programming-reference.pdf.

Signed-off-by: Jing Liu <jing2.liu@linux.intel.com>
---
 arch/x86/kvm/cpuid.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index e18a9f9..10be53f 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -484,6 +484,7 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
 		entry->edx = 0;
 		break;
 	case 7: {
+		int i, times = entry->eax;
 		entry->flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
 		/* Mask ebx against host capability word 9 */
 		if (index == 0) {
@@ -507,12 +508,23 @@ static inline int __do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
 			 * if the host doesn't support it.
 			 */
 			entry->edx |= F(ARCH_CAPABILITIES);
-		} else {
+		} else if (index > times) {
+			entry->eax = 0;
 			entry->ebx = 0;
 			entry->ecx = 0;
 			entry->edx = 0;
 		}
-		entry->eax = 0;
+		for (i = 1; i <= times; i++) {
+			if (*nent >= maxnent)
+				goto out;
+			do_cpuid_1_ent(&entry[i], function, i);
+			entry[i].eax &= F(AVX512_BF16);
+			entry[i].ebx = 0;
+			entry[i].ecx = 0;
+			entry[i].edx = 0;
+			entry[i].flags |= KVM_CPUID_FLAG_SIGNIFCANT_INDEX;
+			++*nent;
+		}
 		break;
 	}
 	case 9:
-- 
1.8.3.1


^ permalink raw reply related

* Re: [RESEND PATCH v5 0/5] ARM: da850: enable cpufreq in DT mode
From: Sekhar Nori @ 2019-06-20 11:17 UTC (permalink / raw)
  To: Bartosz Golaszewski, Kevin Hilman, Rob Herring, Mark Rutland,
	David Lechner, Adam Ford
  Cc: devicetree, linux-kernel, linux-arm-kernel, Bartosz Golaszewski
In-Reply-To: <20190527082259.29237-1-brgl@bgdev.pl>

On 27/05/19 1:52 PM, Bartosz Golaszewski wrote:
> From: Bartosz Golaszewski <bgolaszewski@baylibre.com>
> 
> Note: resending rebased on top of v5.2-rc2
> 
> ===
> 
> This series adds cpufreq-dt operating points for da850 boards supported
> with device tree (da850-lcdk, da850-lego-ev3, da850-evm).
> 
> Last patch enables CPUFREQ_DT in davinci_all_defconfig.

Series applied and pull request sent for v5.3

Thanks,
Sekhar

_______________________________________________
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] PCI: tegra: Enable Relaxed Ordering only for Tegra20 & Tegra30
From: Thierry Reding @ 2019-06-20 11:18 UTC (permalink / raw)
  To: Vidya Sagar
  Cc: bhelgaas, lorenzo.pieralisi, treding, jonathanh, linux-tegra,
	linux-pci, kthota, mmaddireddy, sagar.tv
In-Reply-To: <20190618073810.30270-1-vidyas@nvidia.com>

[-- Attachment #1: Type: text/plain, Size: 479 bytes --]

On Tue, Jun 18, 2019 at 01:08:10PM +0530, Vidya Sagar wrote:
> Currently Relaxed Ordering bit in the configuration space is enabled for
> all devices whereas it should be enabled only for root ports for Tegra20
> and Tegra30 chips to avoid deadlock in hardware.
> 
> Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
> ---
>  drivers/pci/controller/pci-tegra.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)

Acked-by: Thierry Reding <treding@nvidia.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply

* Re: [PATCH] spi/acpi: fix incorrect ACPI parent check
From: Mark Brown @ 2019-06-20 11:19 UTC (permalink / raw)
  To: Mika Westerberg
  Cc: Ard Biesheuvel, Jarkko Nikula, linux-spi, kbuild test robot,
	Dan Carpenter, Andy Shevchenko, Masahisa Kojima,
	Rafael J. Wysocki, ACPI Devel Maling List, Lukas Wunner
In-Reply-To: <20190620104128.GW2640@lahna.fi.intel.com>

[-- Attachment #1: Type: text/plain, Size: 362 bytes --]

On Thu, Jun 20, 2019 at 01:41:28PM +0300, Mika Westerberg wrote:
> On Thu, Jun 20, 2019 at 12:33:41PM +0200, Ard Biesheuvel wrote:

> IMHO it's better to do:

> 	memset(&lookup, 0, sizeof(lookup));
> 	lookup.ctlr = ctlr;
> 	lookup.irq = -1;

> this also initializes chip_select and possibly other fields that get
> added to the lookup structure later.

I agree.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply

* [meta-rockchip] [PATCH v3 0/9] add new SoCs support
From: ayaka @ 2019-06-20 11:19 UTC (permalink / raw)
  To: yocto; +Cc: ayaka

Changelog
v2 Removing the settings applied for vendor kernel
v2 Adding some SoCs which are supported by the upstream kernel
v3 Adding new chip RK1808

Randy 'ayaka' Li (8):
  conf/machine: add support for rk3399
  conf/machine: add support for rk3328
  conf/machine: add support for rv1108
  conf/machine: add support for rk3036
  conf/machine: add support for rk312x
  conf/machine: add support for rk3326
  conf/machine: add support for rk3368
  conf/machine: add support for rk3308

Randy Li (1):
  conf/machine: add support for rk1808

 conf/machine/evb-rk3328.conf       | 11 +++++++++++
 conf/machine/evb-rv1108.conf       | 10 ++++++++++
 conf/machine/excavator-rk3399.conf | 12 ++++++++++++
 conf/machine/firefly-rk3399.conf   | 14 ++++++++++++++
 conf/machine/include/rk1808.inc    | 17 +++++++++++++++++
 conf/machine/include/rk3036.inc    | 16 ++++++++++++++++
 conf/machine/include/rk312x.inc    | 17 +++++++++++++++++
 conf/machine/include/rk3308.inc    | 17 +++++++++++++++++
 conf/machine/include/rk3326.inc    | 18 ++++++++++++++++++
 conf/machine/include/rk3328.inc    | 18 ++++++++++++++++++
 conf/machine/include/rk3368.inc    | 17 +++++++++++++++++
 conf/machine/include/rk3399.inc    | 17 +++++++++++++++++
 conf/machine/include/rv1108.inc    | 16 ++++++++++++++++
 conf/machine/kylin-rk3036.conf     | 12 ++++++++++++
 14 files changed, 212 insertions(+)
 create mode 100644 conf/machine/evb-rk3328.conf
 create mode 100644 conf/machine/evb-rv1108.conf
 create mode 100644 conf/machine/excavator-rk3399.conf
 create mode 100644 conf/machine/firefly-rk3399.conf
 create mode 100644 conf/machine/include/rk1808.inc
 create mode 100644 conf/machine/include/rk3036.inc
 create mode 100644 conf/machine/include/rk312x.inc
 create mode 100644 conf/machine/include/rk3308.inc
 create mode 100644 conf/machine/include/rk3326.inc
 create mode 100644 conf/machine/include/rk3328.inc
 create mode 100644 conf/machine/include/rk3368.inc
 create mode 100644 conf/machine/include/rk3399.inc
 create mode 100644 conf/machine/include/rv1108.inc
 create mode 100644 conf/machine/kylin-rk3036.conf

-- 
2.21.0



^ permalink raw reply

* [PATCH v3 1/9] conf/machine: add support for rk3399
From: ayaka @ 2019-06-20 11:19 UTC (permalink / raw)
  To: yocto; +Cc: Randy 'ayaka' Li
In-Reply-To: <20190620111911.4736-1-ayaka@soulik.info>

From: Randy 'ayaka' Li <ayaka@soulik.info>

RK3399 is a new generation powerful SoC from Rockchip, which has
Dual Cortex-A72 + Quad Cortex-A53, 64-bit CPU.

Signed-off-by: Randy 'ayaka' Li <ayaka@soulik.info>
---
 conf/machine/excavator-rk3399.conf | 12 ++++++++++++
 conf/machine/firefly-rk3399.conf   | 14 ++++++++++++++
 conf/machine/include/rk3399.inc    | 17 +++++++++++++++++
 3 files changed, 43 insertions(+)
 create mode 100644 conf/machine/excavator-rk3399.conf
 create mode 100644 conf/machine/firefly-rk3399.conf
 create mode 100644 conf/machine/include/rk3399.inc

diff --git a/conf/machine/excavator-rk3399.conf b/conf/machine/excavator-rk3399.conf
new file mode 100644
index 0000000..8506a50
--- /dev/null
+++ b/conf/machine/excavator-rk3399.conf
@@ -0,0 +1,12 @@
+# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+#@TYPE: Machine
+#@NAME: EXCAVATOR 3399
+
+include conf/machine/include/rk3399.inc
+
+KERNEL_DEVICETREE = "rockchip/rk3399-sapphire-excavator.dtb"
+UBOOT_MACHINE = "evb-rk3399_defconfig"
+
+GPTIMG_APPEND = "console=ttyS2,1500000n8 rw root=PARTUUID=B921B045-1DF0 rootfstype=ext4 init=/sbin/init"
diff --git a/conf/machine/firefly-rk3399.conf b/conf/machine/firefly-rk3399.conf
new file mode 100644
index 0000000..4e35c3d
--- /dev/null
+++ b/conf/machine/firefly-rk3399.conf
@@ -0,0 +1,14 @@
+# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+#@TYPE: Machine
+#@NAME: Firefly RK3399
+#@DESCRIPTION: Firefly-RK3399 is a Six-Core 64-bit High-Performance Platform.
+#http://www.t-firefly.com/en/
+
+include conf/machine/include/rk3399.inc
+
+KERNEL_DEVICETREE = "rockchip/rk3399-firefly.dtb"
+UBOOT_MACHINE = "evb-rk3399_defconfig"
+
+GPTIMG_APPEND = "console=ttyS2,1500000n8 rw root=PARTUUID=B921B045-1DF0 rootfstype=ext4 init=/sbin/init"
diff --git a/conf/machine/include/rk3399.inc b/conf/machine/include/rk3399.inc
new file mode 100644
index 0000000..9237616
--- /dev/null
+++ b/conf/machine/include/rk3399.inc
@@ -0,0 +1,17 @@
+# Copyright (C) 2019 SUMOMO Computer Association
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SOC_FAMILY = "rk3399"
+
+require conf/machine/include/tune-cortexa72.inc
+require conf/machine/include/soc-family.inc
+require conf/machine/include/rockchip-defaults.inc
+
+SERIAL_CONSOLES = "1500000;ttyS2"
+KERNEL_IMAGETYPE = "Image"
+KBUILD_DEFCONFIG = "defconfig"
+
+PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-rockchip"
+
+IMAGE_FSTYPES = "rockchip-gpt-img"
+IMAGE_CLASSES = "rockchip-gpt-img"
-- 
2.21.0



^ permalink raw reply related

* [PATCH v3 2/9] conf/machine: add support for rk3328
From: ayaka @ 2019-06-20 11:19 UTC (permalink / raw)
  To: yocto; +Cc: Randy 'ayaka' Li
In-Reply-To: <20190620111911.4736-1-ayaka@soulik.info>

From: Randy 'ayaka' Li <ayaka@soulik.info>

The RK3328 is a SoC with Quad-core Cortex-A53 for Smart OTT/IPTV.

Signed-off-by: Randy 'ayaka' Li <ayaka@soulik.info>
---
 conf/machine/evb-rk3328.conf    | 11 +++++++++++
 conf/machine/include/rk3328.inc | 18 ++++++++++++++++++
 2 files changed, 29 insertions(+)
 create mode 100644 conf/machine/evb-rk3328.conf
 create mode 100644 conf/machine/include/rk3328.inc

diff --git a/conf/machine/evb-rk3328.conf b/conf/machine/evb-rk3328.conf
new file mode 100644
index 0000000..ae2c0f8
--- /dev/null
+++ b/conf/machine/evb-rk3328.conf
@@ -0,0 +1,11 @@
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+#@TYPE: Machine
+#@NAME: EVB 3388
+
+include conf/machine/include/rk3328.inc
+
+KERNEL_DEVICETREE = "rockchip/rk3328-evb.dtb"
+UBOOT_MACHINE = "evb-rk3328_defconfig"
+
+GPTIMG_APPEND = "console=ttyS2,1500000n8 rw root=PARTUUID=B921B045-1DF0 rootfstype=ext4 init=/sbin/init"
diff --git a/conf/machine/include/rk3328.inc b/conf/machine/include/rk3328.inc
new file mode 100644
index 0000000..de5c9f4
--- /dev/null
+++ b/conf/machine/include/rk3328.inc
@@ -0,0 +1,18 @@
+# Copyright (C) 2017 Randy Li <ayaka@soulik.info>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+# RK3228H is the same SoC as rk3328.
+SOC_FAMILY = "rk3328"
+
+require conf/machine/include/tune-cortexa53.inc
+require conf/machine/include/soc-family.inc
+require conf/machine/include/rockchip-defaults.inc
+
+SERIAL_CONSOLES = "1500000;ttyS2"
+KERNEL_IMAGETYPE = "Image"
+KBUILD_DEFCONFIG = "defconfig"
+
+PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-rockchip"
+
+IMAGE_FSTYPES = "rockchip-gpt-img"
+IMAGE_CLASSES = "rockchip-gpt-img"
-- 
2.21.0



^ permalink raw reply related

* [PATCH v3 3/9] conf/machine: add support for rv1108
From: ayaka @ 2019-06-20 11:19 UTC (permalink / raw)
  To: yocto; +Cc: Randy 'ayaka' Li
In-Reply-To: <20190620111911.4736-1-ayaka@soulik.info>

From: Randy 'ayaka' Li <ayaka@soulik.info>

RV1108 is a SoC specific for video enhanced and
recording. It is embedded with a DSP for digital
process and an ARM Cortex-A7 single core processor
for system and application.

Signed-off-by: Randy 'ayaka' Li <ayaka@soulik.info>
---
 conf/machine/evb-rv1108.conf    | 10 ++++++++++
 conf/machine/include/rv1108.inc | 16 ++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 conf/machine/evb-rv1108.conf
 create mode 100644 conf/machine/include/rv1108.inc

diff --git a/conf/machine/evb-rv1108.conf b/conf/machine/evb-rv1108.conf
new file mode 100644
index 0000000..3e85d80
--- /dev/null
+++ b/conf/machine/evb-rv1108.conf
@@ -0,0 +1,10 @@
+# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+#@TYPE: Machine
+#@NAME: EVB rv1108
+
+include conf/machine/include/rv1108.inc
+
+KERNEL_DEVICETREE = "rv1108-evb.dtb"
+UBOOT_MACHINE = "evb-rk3288_defconfig"
diff --git a/conf/machine/include/rv1108.inc b/conf/machine/include/rv1108.inc
new file mode 100644
index 0000000..c1bb584
--- /dev/null
+++ b/conf/machine/include/rv1108.inc
@@ -0,0 +1,16 @@
+# Copyright (C) 2019 Randy 'ayaka' Li <ayaka@soulik.info>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SOC_FAMILY = "rv1108"
+
+require conf/machine/include/tune-cortexa7.inc
+require conf/machine/include/soc-family.inc
+require conf/machine/include/rockchip-defaults.inc
+
+SERIAL_CONSOLES = "1500000;ttyS2"
+
+PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-rockchip"
+SPL_BINARY ?= "u-boot-spl-nodtb.bin"
+
+IMAGE_FSTYPES = "rockchip-gpt-img"
+IMAGE_CLASSES = "rockchip-gpt-img"
-- 
2.21.0



^ permalink raw reply related

* [PATCH v3 4/9] conf/machine: add support for rk3036
From: ayaka @ 2019-06-20 11:19 UTC (permalink / raw)
  To: yocto; +Cc: Randy 'ayaka' Li, Randy Li
In-Reply-To: <20190620111911.4736-1-ayaka@soulik.info>

From: Randy 'ayaka' Li <ayaka@soulik.info>

RK3036 is a SoC from Rockchip which has Dual-Core
ARM Cortex-A7 CPU, for low-end OTT TV Box.

Supporting video acceleration for the HEVC and AVC
up to 1080P video. With a HDMI sink.

Signed-off-by: Randy 'ayaka' Li <ayaka@soulik.info>
Signed-off-by: Randy Li <randy.li@rock-chips.com>
---
 conf/machine/include/rk3036.inc | 16 ++++++++++++++++
 conf/machine/kylin-rk3036.conf  | 12 ++++++++++++
 2 files changed, 28 insertions(+)
 create mode 100644 conf/machine/include/rk3036.inc
 create mode 100644 conf/machine/kylin-rk3036.conf

diff --git a/conf/machine/include/rk3036.inc b/conf/machine/include/rk3036.inc
new file mode 100644
index 0000000..196f5a3
--- /dev/null
+++ b/conf/machine/include/rk3036.inc
@@ -0,0 +1,16 @@
+# Copyright (C) 2018 Randy 'ayaka' Li <ayaka@soulik.info>
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SOC_FAMILY = "rk3036"
+
+require conf/machine/include/tune-cortexa7.inc
+require conf/machine/include/soc-family.inc
+require conf/machine/include/rockchip-defaults.inc
+
+SERIAL_CONSOLES = "115200;ttyS2"
+
+PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-rockchip"
+SPL_BINARY ?= "u-boot-spl-nodtb.bin"
+
+IMAGE_FSTYPES = "rockchip-gpt-img"
+IMAGE_CLASSES = "rockchip-gpt-img"
diff --git a/conf/machine/kylin-rk3036.conf b/conf/machine/kylin-rk3036.conf
new file mode 100644
index 0000000..e47a3be
--- /dev/null
+++ b/conf/machine/kylin-rk3036.conf
@@ -0,0 +1,12 @@
+# Copyright (C) 2017 Fuzhou Rockchip Electronics Co., Ltd
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+#@TYPE: Machine
+#@NAME: Kylin rk3036
+
+include conf/machine/include/rk3036.inc
+
+KERNEL_DEVICETREE = "rk3036-kylin.dtb"
+UBOOT_MACHINE = "kylin-rk3036_defconfig"
+
+GPTIMG_APPEND = "console=ttyS2,115200n8 rw root=PARTUUID=69DAD710-2CE4 rootfstype=ext4 init=/sbin/init"
-- 
2.21.0



^ permalink raw reply related

* [PATCH v3 5/9] conf/machine: add support for rk312x
From: ayaka @ 2019-06-20 11:19 UTC (permalink / raw)
  To: yocto; +Cc: Randy 'ayaka' Li
In-Reply-To: <20190620111911.4736-1-ayaka@soulik.info>

From: Randy 'ayaka' Li <ayaka@soulik.info>

RK312X are a serial called RK audio. All of them sharing
the simliar hardware configure. A quad-core ARM Cortex-A7
processor with separately Neon and FPU coprocessor, they
also share a 256KB L2 Cache.

All chips in this serial have a Mali 400 MP2 GPU.

Signed-off-by: Randy 'ayaka' Li <ayaka@soulik.info>
---
 conf/machine/include/rk312x.inc | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 conf/machine/include/rk312x.inc

diff --git a/conf/machine/include/rk312x.inc b/conf/machine/include/rk312x.inc
new file mode 100644
index 0000000..675c699
--- /dev/null
+++ b/conf/machine/include/rk312x.inc
@@ -0,0 +1,17 @@
+# Copyright (C) 2019 SUMOMO Computer Assocation
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+# a serial of chips
+SOC_FAMILY = "rk312x"
+
+require conf/machine/include/tune-cortexa7.inc
+require conf/machine/include/soc-family.inc
+require conf/machine/include/rockchip-defaults.inc
+
+SERIAL_CONSOLES = "115200;ttyS2"
+
+PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-rockchip"
+SPL_BINARY ?= "u-boot-spl-nodtb.bin"
+
+IMAGE_FSTYPES = "rockchip-gpt-img"
+IMAGE_CLASSES = "rockchip-gpt-img"
-- 
2.21.0



^ permalink raw reply related

* [PATCH v3 6/9] conf/machine: add support for rk3326
From: ayaka @ 2019-06-20 11:19 UTC (permalink / raw)
  To: yocto; +Cc: Randy 'ayaka' Li
In-Reply-To: <20190620111911.4736-1-ayaka@soulik.info>

From: Randy 'ayaka' Li <ayaka@soulik.info>

RK3326 is a high-performance quad-core application processor,
it supports both H.264 and H.265 decoding up to 1920x1080@30fps.

Signed-off-by: Randy 'ayaka' Li <ayaka@soulik.info>
---
 conf/machine/include/rk3326.inc | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 conf/machine/include/rk3326.inc

diff --git a/conf/machine/include/rk3326.inc b/conf/machine/include/rk3326.inc
new file mode 100644
index 0000000..1208b65
--- /dev/null
+++ b/conf/machine/include/rk3326.inc
@@ -0,0 +1,18 @@
+# Copyright (C) 2019 SUMOMO Computer Association
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+# PX30 is the same SoC as rk3326.
+SOC_FAMILY = "rk3326"
+
+require conf/machine/include/tune-cortexa35.inc
+require conf/machine/include/soc-family.inc
+require conf/machine/include/rockchip-defaults.inc
+
+SERIAL_CONSOLES = "1500000;ttyS2"
+KERNEL_IMAGETYPE = "Image"
+KBUILD_DEFCONFIG = "defconfig"
+
+PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-rockchip"
+
+IMAGE_FSTYPES = "rockchip-gpt-img"
+IMAGE_CLASSES = "rockchip-gpt-img"
-- 
2.21.0



^ permalink raw reply related

* [PATCH v3 7/9] conf/machine: add support for rk3368
From: ayaka @ 2019-06-20 11:19 UTC (permalink / raw)
  To: yocto; +Cc: Randy 'ayaka' Li
In-Reply-To: <20190620111911.4736-1-ayaka@soulik.info>

From: Randy 'ayaka' Li <ayaka@soulik.info>

RK3368 is integrated with a qual-core Cortex-A53 processor
and separately NEON coprocessor.

RK3368 supports H.264 decoder up to 4Kx2K@30fps, H.265
decoder by 4Kx2K@60fps.

Signed-off-by: Randy 'ayaka' Li <ayaka@soulik.info>
---
 conf/machine/include/rk3368.inc | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 conf/machine/include/rk3368.inc

diff --git a/conf/machine/include/rk3368.inc b/conf/machine/include/rk3368.inc
new file mode 100644
index 0000000..1738f74
--- /dev/null
+++ b/conf/machine/include/rk3368.inc
@@ -0,0 +1,17 @@
+# Copyright (C) 2019 SUMOMO Computer Assocation
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SOC_FAMILY = "rk3368"
+
+require conf/machine/include/tune-cortexa53.inc
+require conf/machine/include/soc-family.inc
+require conf/machine/include/rockchip-defaults.inc
+
+SERIAL_CONSOLES = "1500000;ttyS2"
+KERNEL_IMAGETYPE = "Image"
+KBUILD_DEFCONFIG = "defconfig"
+
+PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-rockchip"
+
+IMAGE_FSTYPES = "rockchip-gpt-img"
+IMAGE_CLASSES = "rockchip-gpt-img"
-- 
2.21.0



^ permalink raw reply related

* [PATCH v3 8/9] conf/machine: add support for rk3308
From: ayaka @ 2019-06-20 11:19 UTC (permalink / raw)
  To: yocto; +Cc: Randy 'ayaka' Li
In-Reply-To: <20190620111911.4736-1-ayaka@soulik.info>

From: Randy 'ayaka' Li <ayaka@soulik.info>

RK3308 is a high-performance quad-core application processor
designed for intelligent voice interaction.

Signed-off-by: Randy 'ayaka' Li <ayaka@soulik.info>
---
 conf/machine/include/rk3308.inc | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
 create mode 100644 conf/machine/include/rk3308.inc

diff --git a/conf/machine/include/rk3308.inc b/conf/machine/include/rk3308.inc
new file mode 100644
index 0000000..81e4def
--- /dev/null
+++ b/conf/machine/include/rk3308.inc
@@ -0,0 +1,17 @@
+# Copyright (C) SUMOMO Computer Assocation
+# Released under the MIT license (see COPYING.MIT for the terms)
+
+SOC_FAMILY = "rk3308"
+
+require conf/machine/include/tune-cortexa35.inc
+require conf/machine/include/soc-family.inc
+require conf/machine/include/rockchip-defaults.inc
+
+SERIAL_CONSOLES = "1500000;ttyS2"
+KERNEL_IMAGETYPE = "Image"
+KBUILD_DEFCONFIG = "defconfig"
+
+PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot-rockchip"
+
+IMAGE_FSTYPES = "rockchip-gpt-img"
+IMAGE_CLASSES = "rockchip-gpt-img"
-- 
2.21.0



^ permalink raw reply related


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.