[PATCH 3/3] nvme: remove single trailing whitespace

2021-04-10 Thread Niklas Cassel
There is a single trailing whitespace in core.c. Since this is just a single whitespace, the chances of this affecting backports to stable should be quite low, so let's just remove it. Signed-off-by: Niklas Cassel --- drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 2/3] nvme-multipath: remove single trailing whitespace

2021-04-10 Thread Niklas Cassel
There is a single trailing whitespace in multipath.c. Since this is just a single whitespace, the chances of this affecting backports to stable should be quite low, so let's just remove it. Signed-off-by: Niklas Cassel --- drivers/nvme/host/multipath.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 0/3] nvme trailing whitespace cleanup

2021-04-10 Thread Niklas Cassel
Hello nvme peeps, This series removes all the trailing whitespace I could find using: git grep '[[:blank:]]$' drivers/nvme So this should remove all the existing trailing whitespace in drivers/nvme/* Kind regards, Niklas Niklas Cassel (3): nvme-pci: remove single trailing whitespace nvme

[PATCH 1/3] nvme-pci: remove single trailing whitespace

2021-04-10 Thread Niklas Cassel
There is a single trailing whitespace in pci.c. Since this is just a single whitespace, the chances of this affecting backports to stable should be quite low, so let's just remove it. Signed-off-by: Niklas Cassel --- drivers/nvme/host/pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH] nvme-pci: don't simple map sgl when sgls are disabled

2021-04-09 Thread Niklas Cassel
From: Niklas Cassel According to the module parameter description for sgl_threshold, a value of 0 means that SGLs are disabled. If SGLs are disabled, we should respect that, even for the case where the request is made up of a single physical segment. Fixes: 297910571f08 ("nvme-pci: opt

[PATCH v3] nvme: disallow passthru cmd from targeting a nsid != nsid of the block dev

2021-04-02 Thread Niklas Cassel
From: Niklas Cassel When a passthru command targets a specific namespace, the ns parameter to nvme_user_cmd()/nvme_user_cmd64() is set. However, there is currently no validation that the nsid specified in the passthru command targets the namespace/nsid represented by the block device

Re: [RFC PATCH] nvme: allow NVME_IOCTL_IO_CMD on controller char dev even when multiple ns

2021-03-31 Thread Niklas Cassel
On Tue, Mar 30, 2021 at 08:30:22PM +0200, jav...@javigon.com wrote: > On 26.03.2021 20:59, Niklas Cassel wrote: > > From: Niklas Cassel > > > > Currently when doing NVME_IOCTL_IO_CMD on the controller character device, > > the command is rejected if there

[RFC PATCH] nvme: allow NVME_IOCTL_IO_CMD on controller char dev even when multiple ns

2021-03-26 Thread Niklas Cassel
From: Niklas Cassel Currently when doing NVME_IOCTL_IO_CMD on the controller character device, the command is rejected if there is more than one namespace in the ctrl->namespaces list. There is not really any reason for this restriction. Instead, check the nsid value specified in the passt

Re: [PATCH] nvme: disallow passthru cmd from targeting a nsid != nsid of the block dev

2021-03-26 Thread Niklas Cassel
On Fri, Mar 26, 2021 at 12:19:42AM +0900, Keith Busch wrote: > On Thu, Mar 25, 2021 at 09:48:37AM +0000, Niklas Cassel wrote: > > From: Niklas Cassel > > > > When a passthru command targets a specific namespace, the ns parameter to > > nvme_user_cmd()/nvme_u

[PATCH v2] nvme: disallow passthru cmd from targeting a nsid != nsid of the block dev

2021-03-26 Thread Niklas Cassel
From: Niklas Cassel When a passthru command targets a specific namespace, the ns parameter to nvme_user_cmd()/nvme_user_cmd64() is set. However, there is currently no validation that the nsid specified in the passthru command targets the namespace/nsid represented by the block device

Re: [PATCH] nvme: disallow passthru cmd from targeting a nsid != nsid of the block dev

2021-03-25 Thread Niklas Cassel
On Thu, Mar 25, 2021 at 09:48:37AM +, Niklas Cassel wrote: > From: Niklas Cassel > > When a passthru command targets a specific namespace, the ns parameter to > nvme_user_cmd()/nvme_user_cmd64() is set. However, there is currently no > validation that the nsid specified

[PATCH] nvme: disallow passthru cmd from targeting a nsid != nsid of the block dev

2021-03-25 Thread Niklas Cassel
From: Niklas Cassel When a passthru command targets a specific namespace, the ns parameter to nvme_user_cmd()/nvme_user_cmd64() is set. However, there is currently no validation that the nsid specified in the passthru command targets the namespace/nsid represented by the block device

Re: [PATCH] Revert "nvme: cleanup zone information initialization"

2021-03-08 Thread Niklas Cassel
On Mon, Mar 08, 2021 at 10:02:05PM +0530, Kanchan Joshi wrote: > On Mon, Mar 8, 2021 at 4:21 PM Niklas Cassel wrote: > > > > From: Niklas Cassel > > > > This reverts commit 73d90386b559d6f4c3c5db5e6bb1b68aae8fd3e7. > > > > Commit 73d90386b559 ("n

[PATCH] Revert "nvme: cleanup zone information initialization"

2021-03-08 Thread Niklas Cassel
From: Niklas Cassel This reverts commit 73d90386b559d6f4c3c5db5e6bb1b68aae8fd3e7. Commit 73d90386b559 ("nvme: cleanup zone information initialization") introduced the following warning at boot: WARNING: CPU: 0 PID: 7 at block/blk-settings.c:252 blk_queue_max_zone_append_sectors

Re: [PATCH 1/4] power: avs: qcom-cpr: Move the driver to the qcom specific drivers

2020-10-20 Thread Niklas Cassel
e to collect SoC specific drivers like these, into the SoC specific > directories. > > Therefore, let's move the qcom-cpr driver to the qcom directory. > > Cc: Niklas Cassel > Cc: Bjorn Andersson > Cc: Andy Gross > Cc: linux-arm-...@vger.kernel.org > Signed-off-b

Re: [PATCH v3] null_blk: add support for max open/active zone limit for zoned devices

2020-09-17 Thread Niklas Cassel
On Mon, Sep 07, 2020 at 08:18:26AM +, Niklas Cassel wrote: > On Fri, Aug 28, 2020 at 12:54:00PM +0200, Niklas Cassel wrote: > > Add support for user space to set a max open zone and a max active zone > > limit via configfs. By default, the default values are 0 == no limit

Re: [PATCH v3] null_blk: add support for max open/active zone limit for zoned devices

2020-09-07 Thread Niklas Cassel
On Fri, Aug 28, 2020 at 12:54:00PM +0200, Niklas Cassel wrote: > Add support for user space to set a max open zone and a max active zone > limit via configfs. By default, the default values are 0 == no limit. > > Call the block layer API functions used for exposing the configu

[PATCH v3] null_blk: add support for max open/active zone limit for zoned devices

2020-08-28 Thread Niklas Cassel
ZBC. Therefore, implement the manage open zone resources function from ZBC, but additionally add support for max active zones. This enables user space not only to test against a device with an open zone limit, but also to test against a device with an active zone limit. Signed-off-by: Niklas Cassel

Re: [PATCH v2] null_blk: add support for max open/active zone limit for zoned devices

2020-08-28 Thread Niklas Cassel
On Fri, Aug 28, 2020 at 07:06:26AM +, Damien Le Moal wrote: > On 2020/08/27 22:50, Niklas Cassel wrote: > > Add support for user space to set a max open zone and a max active zone > > limit via configfs. By default, the default values are 0 == no limit. > > > &g

Re: [PATCH] null_blk: add support for max open/active zone limit for zoned devices

2020-08-27 Thread Niklas Cassel
On Tue, Aug 25, 2020 at 11:03:58PM +, Damien Le Moal wrote: > On 2020/08/26 7:52, Damien Le Moal wrote: > > On 2020/08/25 21:22, Niklas Cassel wrote: (snip) > Arg. No, you can't. There is the trace call after the switch. So please ignore > this comment :) > > Bu

[PATCH v2] null_blk: add support for max open/active zone limit for zoned devices

2020-08-27 Thread Niklas Cassel
ZBC. Therefore, implement the manage open zone resources function from ZBC, but additionally add support for max active zones. This enables user space not only to test against a device with an open zone limit, but also to test against a device with an active zone limit. Signed-off-by: Niklas Cassel

[PATCH] null_blk: add support for max open/active zone limit for zoned devices

2020-08-25 Thread Niklas Cassel
. Therefore, implement the manage open zone resources function from ZBC, but additionally add support for max active zones. This enables user space not only to test against a device with an open zone limit, but also to test against a device with an active zone limit. Signed-off-by: Niklas Cassel

[PATCH] scsi: scsi_debug: Remove superfluous close zone in resp_open_zone()

2020-08-21 Thread Niklas Cassel
for resp_open_zone() to call zbc_close_zone() on an implicitly open zone before calling zbc_open_zone(). Remove superfluous close zone in resp_open_zone(). Signed-off-by: Niklas Cassel --- drivers/scsi/scsi_debug.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi

[PATCH v3 2/2] block: add max_active_zones to blk-sysfs

2020-07-14 Thread Niklas Cassel
max_active_zones as 0, signifying "no limit". Signed-off-by: Niklas Cassel Reviewed-by: Javier González Reviewed-by: Damien Le Moal --- Documentation/ABI/testing/sysfs-block | 9 + Documentation/block/queue-sysfs.rst | 7 +++ block/blk-sysfs.c

[PATCH v3 1/2] block: add max_open_zones to blk-sysfs

2020-07-14 Thread Niklas Cassel
as SCSI devices by the kernel), and ZBC SCSI devices. Add the new max_open_zones member to struct request_queue, rather than as a queue limit, since this property cannot be split across stacking drivers. Signed-off-by: Niklas Cassel Reviewed-by: Javier González Reviewed-by: Damien Le Moal

[PATCH v3 0/2] Export max open zones and max active zones to sysfs

2020-07-14 Thread Niklas Cassel
limit". Changes since v2: -Picked up Damien's Reviewed-by tags. -Update Documentation/ABI/testing/sysfs-block in addition to Documentation/block/queue-sysfs.rst (Greg). -Added bdev_max_open_zones()/bdev_max_active_zones() helpers (Johannes). Niklas Cassel (2): block: add max_open_z

Re: [PATCH v2 1/2] block: add max_open_zones to blk-sysfs

2020-07-03 Thread Niklas Cassel
On Fri, Jul 03, 2020 at 08:22:45AM +, Johannes Thumshirn wrote: > On 02/07/2020 20:20, Niklas Cassel wrote: > > Documentation/block/queue-sysfs.rst | 7 +++ > > block/blk-sysfs.c | 15 +++ > > drivers/nvme/host/zns.c |

[PATCH v2 2/2] block: add max_active_zones to blk-sysfs

2020-07-02 Thread Niklas Cassel
max_active_zones as 0, signifying "no limit". Signed-off-by: Niklas Cassel Reviewed-by: Javier González --- Documentation/block/queue-sysfs.rst | 7 +++ block/blk-sysfs.c | 14 +- drivers/nvme/host/zns.c | 1 + drivers/scsi/sd_zbc.c

[PATCH v2 1/2] block: add max_open_zones to blk-sysfs

2020-07-02 Thread Niklas Cassel
as SCSI devices by the kernel), and ZBC SCSI devices. Add the new max_open_zones member to struct request_queue, rather than as a queue limit, since this property cannot be split across stacking drivers. Signed-off-by: Niklas Cassel Reviewed-by: Javier González --- Documentation/block/queue-sysfs.rst

[PATCH v2 0/2] Export max open zones and max active zones to sysfs

2020-07-02 Thread Niklas Cassel
eviewed-by tags. -Reworded commit message (Damien). -Dropped unused stubs for setting MAR/MOR when building without CONFIG_BLK_DEV_ZONED (Damien). Niklas Cassel (2): block: add max_open_zones to blk-sysfs block: add max_active_zones to blk-sysfs Documentation/block/queue-sysfs.rst

Re: [PATCH 1/2] block: add max_open_zones to blk-sysfs

2020-07-02 Thread Niklas Cassel
On Tue, Jun 30, 2020 at 01:49:41AM +, Damien Le Moal wrote: > On 2020/06/16 19:28, Niklas Cassel wrote: > > diff --git a/drivers/nvme/host/zns.c b/drivers/nvme/host/zns.c > > index c08f6281b614..af156529f3b6 100644 > > --- a/drivers/nvme/host/zns.c > > ++

Re: [PATCH 2/2] block: add max_active_zones to blk-sysfs

2020-07-02 Thread Niklas Cassel
On Wed, Jul 01, 2020 at 01:16:52PM +0200, Javier González wrote: > On 16.06.2020 12:25, Niklas Cassel wrote: > > Add a new max_active zones definition in the sysfs documentation. > > This definition will be common for all devices utilizing the zoned block > > device

Re: [PATCH 1/2] block: add zone_desc_ext_bytes to sysfs

2020-06-29 Thread Niklas Cassel
On Mon, Jun 29, 2020 at 12:52:46AM +, Damien Le Moal wrote: > On 2020/06/29 8:01, Matias Bjorling wrote: > > The NVMe Zoned Namespace Command Set adds support for associating > > data to a zone through the Zone Descriptor Extension feature. > > > > The Zone Descriptor Extension size is fixed

Re: [PATCH v2 0/2] remove workarounds for gcc bug wrt unnamed fields in initializers

2020-06-25 Thread Niklas Cassel
On Wed, Jun 24, 2020 at 10:40:21PM +, Chaitanya Kulkarni wrote: > Christoph, Sagi and Keith, > > On 6/24/20 9:44 AM, Christoph Hellwig wrote: > > This looks good to me, but I'd rather wait a few releases to > > avoid too mush backporting pain. > > > > Here is a summary, for longer

Re: [PATCH v2 0/2] remove workarounds for gcc bug wrt unnamed fields in initializers

2020-06-24 Thread Niklas Cassel
On Wed, Jun 24, 2020 at 07:02:11PM +0200, Christoph Hellwig wrote: > On Wed, Jun 24, 2020 at 04:57:48PM +0000, Niklas Cassel wrote: > > On Wed, Jun 24, 2020 at 06:44:41PM +0200, Christoph Hellwig wrote: > > > This looks good to me, but I'd rather wait a few releases to &g

Re: [PATCH v2 0/2] remove workarounds for gcc bug wrt unnamed fields in initializers

2020-06-24 Thread Niklas Cassel
On Wed, Jun 24, 2020 at 06:44:41PM +0200, Christoph Hellwig wrote: > This looks good to me, but I'd rather wait a few releases to > avoid too mush backporting pain. Chaitanya made me realize that about half of the nvme functions are using "struct nvme_command c" on the stack, and then memsets it,

[PATCH v2 0/2] remove workarounds for gcc bug wrt unnamed fields in initializers

2020-06-18 Thread Niklas Cassel
uild for anonymous union in older GCC compilers"). Changes since v1: -Fixed RDMA build error. Niklas Cassel (2): nvme: remove workarounds for gcc bug wrt unnamed fields in initializers nvmet: remove workarounds for gcc bug wrt unnamed fields in initializers drivers/nv

[PATCH v2 2/2] nvmet: remove workarounds for gcc bug wrt unnamed fields in initializers

2020-06-18 Thread Niklas Cassel
t should now be safe to remove these workarounds and make the code look like it did before commit e44ac588cd61 ("drivers/block/nvme-core.c: fix build with gcc-4.4.4") was introduced. Signed-off-by: Niklas Cassel --- drivers/nvme/target/rdma.c | 23 --- 1 file changed,

[PATCH v2 1/2] nvme: remove workarounds for gcc bug wrt unnamed fields in initializers

2020-06-18 Thread Niklas Cassel
t should now be safe to remove these workarounds and make the code look like it did before commit e44ac588cd61 ("drivers/block/nvme-core.c: fix build with gcc-4.4.4") was introduced. Signed-off-by: Niklas Cassel --- drivers/nvme/host/core.c | 59 ++-

Re: [PATCH 2/2] nvmet: remove workarounds for gcc bug wrt unnamed fields in initializers

2020-06-18 Thread Niklas Cassel
On Thu, Jun 18, 2020 at 05:29:00PM +, Chaitanya Kulkarni wrote: > I'm not against the code cleanup and it always welcome. > Please also have a look at other comment. > > >> What is the issue with existing code that we need this patch for ? > >> > > > > Hello Chaitanya, > > > > This is just

Re: [PATCH 1/2] nvme: remove workarounds for gcc bug wrt unnamed fields in initializers

2020-06-18 Thread Niklas Cassel
On Thu, Jun 18, 2020 at 07:11:24PM +0200, Daniel Wagner wrote: > On Thu, Jun 18, 2020 at 04:32:40PM +0200, Niklas Cassel wrote: > > If, for some reason, we want to allow builds with gcc < 4.6.0 > > even though the minimum gcc version is now 4.8.0, > > Just one thing to wat

Re: [PATCH 2/2] nvmet: remove workarounds for gcc bug wrt unnamed fields in initializers

2020-06-18 Thread Niklas Cassel
On Thu, Jun 18, 2020 at 03:23:21PM +, Chaitanya Kulkarni wrote: > On 6/18/20 7:32 AM, Niklas Cassel wrote: > > drivers/nvme/target/rdma.c | 23 --- > > 1 file changed, 12 insertions(+), 11 deletions(-) > > > > diff --git a/drivers/nvme/t

[PATCH 2/2] nvmet: remove workarounds for gcc bug wrt unnamed fields in initializers

2020-06-18 Thread Niklas Cassel
t should now be safe to remove these workarounds and make the code look like it did before commit e44ac588cd61 ("drivers/block/nvme-core.c: fix build with gcc-4.4.4") was introduced. Signed-off-by: Niklas Cassel --- If, for some reason, we want to allow builds with gcc < 4.6.0 even

[PATCH 1/2] nvme: remove workarounds for gcc bug wrt unnamed fields in initializers

2020-06-18 Thread Niklas Cassel
t should now be safe to remove these workarounds and make the code look like it did before commit e44ac588cd61 ("drivers/block/nvme-core.c: fix build with gcc-4.4.4") was introduced. Signed-off-by: Niklas Cassel --- If, for some reason, we want to allow builds with gcc < 4.6.0 even

[PATCH 1/2] block: add max_open_zones to blk-sysfs

2020-06-16 Thread Niklas Cassel
as SCSI devices by the kernel), and ZBC SCSI devices. Add the new max_open_zones struct member to the request_queue, rather than as a queue limit, since this property cannot be split across stacking drivers. Signed-off-by: Niklas Cassel --- Documentation/block/queue-sysfs.rst | 7 +++ block/blk

[PATCH 2/2] block: add max_active_zones to blk-sysfs

2020-06-16 Thread Niklas Cassel
max_active_zones as 0, signifying "no limit". Signed-off-by: Niklas Cassel --- Documentation/block/queue-sysfs.rst | 7 +++ block/blk-sysfs.c | 14 +- drivers/nvme/host/zns.c | 1 + drivers/scsi/sd_zbc.c | 1 + include/linu

[PATCH 0/2] Export max open zones and max active zones to sysfs

2020-06-16 Thread Niklas Cassel
is new definition. For ZAC/ZBC devices, this field will be exported as 0, meaning "no limit". Niklas Cassel (2): block: add max_open_zones to blk-sysfs block: add max_active_zones to blk-sysfs Documentation/block/queue-sysfs.rst | 14 ++ block/blk-sysfs.c | 27 +

[PATCH] nvme: do not call del_gendisk() on a disk that was never added

2020-06-07 Thread Niklas Cassel
;nvme: enforce extended LBA format for fabrics metadata") Signed-off-by: Niklas Cassel --- An alternative would be to do like nvme_ns_remove(), i.e. in the error path; check if ns->disk->flags & GENHD_FL_UP is set, and only then call del_gendisk(). However, that seems unnecessary, si

Re: [PATCH] nvme: prevent double free in nvme_alloc_ns() error handling

2020-04-28 Thread Niklas Cassel
On Tue, Apr 28, 2020 at 09:06:51AM +0200, Javier González wrote: > CAUTION: This email originated from outside of Western Digital. Do not click > on links or open attachments unless you recognize the sender and know that > the content is safe. > > > On 27.04.2020 18:22, N

Re: [PATCH] opp: of: drop incorrect lockdep_assert_held()

2019-10-23 Thread Niklas Cassel
> OPP table itself. > > > > The lockdep_assert_held() was added there by mistake and isn't really > > required. > > > > Fixes: 5d6d106fa455 ("OPP: Populate required opp tables from > > "required-opps" property") > > Cc: v5.0+ # v5.0+ > > Repor

[PATCH] arm64: dts: qcom: qcs404-evb: Set vdd_apc regulator in high power mode

2019-10-14 Thread Niklas Cassel
sudden load changes will be less severe, and we have not been able to reproduce the invalid page faults with the regulator in this mode. Signed-off-by: Niklas Cassel Suggested-by: Bjorn Andersson --- arch/arm64/boot/dts/qcom/qcs404-evb.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch

Re: [PATCH v2 7/9] arm64: dts: qcom: msm8998: Add PSCI cpuidle low power states

2019-10-02 Thread Niklas Cassel
On Wed, Oct 02, 2019 at 11:19:50AM +0200, Niklas Cassel wrote: > On Mon, Sep 30, 2019 at 04:20:15PM -0600, Jeffrey Hugo wrote: > > Amit, the merged version of the below change causes a boot failure > > (nasty hang, sometimes with RCU stalls) on the msm8998 laptops. Oddly >

Re: [PATCH v2 7/9] arm64: dts: qcom: msm8998: Add PSCI cpuidle low power states

2019-10-02 Thread Niklas Cassel
On Mon, Sep 30, 2019 at 04:20:15PM -0600, Jeffrey Hugo wrote: > Amit, the merged version of the below change causes a boot failure > (nasty hang, sometimes with RCU stalls) on the msm8998 laptops. Oddly > enough, it seems to be resolved if I remove the cpu-idle-states > property from one of the

Re: [PATCH] rpmsg: glink-smem: Name the edge based on parent remoteproc

2019-09-05 Thread Niklas Cassel
= parent; > dev->of_node = node; > dev->release = qcom_glink_smem_release; > - dev_set_name(dev, "%pOFn:%pOFn", node->parent, node); > + dev_set_name(dev, "%s:%pOFn", dev_name(parent->parent), node); > ret = device_register(dev); > if (ret) { > pr_err("failed to register glink edge\n"); > -- > 2.18.0 > Reviewed-by: Niklas Cassel

Re: [PATCH] rpmsg: glink-smem: Name the edge based on parent remoteproc

2019-09-05 Thread Niklas Cassel
On Mon, Aug 19, 2019 at 09:16:56PM -0700, Bjorn Andersson wrote: > Naming the glink edge device on the parent of_node short name causes > collisions when multiple remoteproc instances with only different unit > address are described on the platform_bus in DeviceTree. > > Base the edge's name on

[PATCH] PCI: dwc: fix find_next_bit() usage

2019-09-04 Thread Niklas Cassel
in find_next_bit+0x38/0xb0 Fixes: 1b497e6493c4 ("PCI: dwc: Fix uninitialized variable in dw_handle_msi_irq()") Signed-off-by: Niklas Cassel --- drivers/pci/controller/dwc/pcie-designware-host.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/pci/cont

[PATCH v4 06/14] dt-bindings: opp: qcom-nvmem: Support pstates provided by a power domain

2019-08-30 Thread Niklas Cassel
-off-by: Niklas Cassel Reviewed-by: Rob Herring --- Changes since V3: -In Example 2: rename the node name from cpr to power-controller, and rename the label from cprpd to cpr. .../bindings/opp/qcom-nvmem-cpufreq.txt | 113 +- 1 file changed, 112 insertions(+), 1 deletion

Re: [PATCH v3 06/14] dt-bindings: cpufreq: qcom-nvmem: Support pstates provided by a power domain

2019-08-22 Thread Niklas Cassel
On Mon, Aug 19, 2019 at 10:59:36AM -0700, Stephen Boyd wrote: > Quoting Niklas Cassel (2019-08-19 03:09:57) > > + > > +soc { > > + > > + cprpd: cpr@b018000 { > > Maybe node name should be 'avs' for the industry standard adaptive > voltage scaling

Re: [PATCH v2 10/14] dt-bindings: power: avs: Add support for CPR (Core Power Reduction)

2019-08-22 Thread Niklas Cassel
On Fri, Aug 16, 2019 at 11:14:13PM -0700, Stephen Boyd wrote: > Quoting Niklas Cassel (2019-07-25 03:41:38) > > + cpr@b018000 { > > + compatible = "qcom,qcs404-cpr", "qcom,cpr"; > > + reg = <0x0b018000 0x1

Re: [PATCH v3 0/8] arm64: dts: qcom: sm8150: Add SM8150 DTS

2019-08-21 Thread Niklas Cassel
ch/arm64/boot/dts/qcom/sm8150-mtp.dts > create mode 100644 arch/arm64/boot/dts/qcom/sm8150.dtsi > > -- > 2.20.1 > Whole series is: Reviewed-by: Niklas Cassel

Re: [PATCH v2 0/8] arm64: dts: qcom: sm8150: Add SM8150 DTS

2019-08-20 Thread Niklas Cassel
On Tue, Aug 20, 2019 at 12:12:08PM +0530, Vinod Koul wrote: > This series adds DTS for SM8150, PMIC PM8150, PM8150B, PM8150L and > the MTP for SM8150. > > Changes in v2: > - Squash patches > - Fix comments given by Stephen namely, lowercase for hext numbers, >making rpmhcc have xo_board as

Re: [PATCH v2 1/8] arm64: dts: qcom: sm8150: add base dts file

2019-08-20 Thread Niklas Cassel
On Tue, Aug 20, 2019 at 12:12:09PM +0530, Vinod Koul wrote: > This add base DTS file with cpu, psci, firmware, clock, tlmm and > spmi nodes which enables boot to console > > Signed-off-by: Vinod Koul > --- > arch/arm64/boot/dts/qcom/sm8150.dtsi | 305 +++ > 1 file

Re: [PATCH v2 3/8] arm64: dts: qcom: pm8150b: Add Base DTS file

2019-08-20 Thread Niklas Cassel
On Tue, Aug 20, 2019 at 12:12:11PM +0530, Vinod Koul wrote: > PMIC pm8150b is a slave pmic and this adds base DTS file for pm8150b > with pon, adc, and gpio nodes All of your other commit messages refers to it as power-on instead of pon, be consistent. > > Signed-off-by: Vinod Koul > --- >

Re: [PATCH v2 2/8] arm64: dts: qcom: pm8150: Add Base DTS file

2019-08-20 Thread Niklas Cassel
On Tue, Aug 20, 2019 at 12:12:10PM +0530, Vinod Koul wrote: > Add base DTS file for pm8150 along with GPIOs, power-on, rtc and vadc > nodes > > Signed-off-by: Vinod Koul > --- > arch/arm64/boot/dts/qcom/pm8150.dtsi | 95 > 1 file changed, 95 insertions(+) > create

Re: [PATCH v2 5/8] arm64: dts: qcom: sm8150-mtp: add base dts file

2019-08-20 Thread Niklas Cassel
On Tue, Aug 20, 2019 at 12:12:13PM +0530, Vinod Koul wrote: > This add base DTS file for sm8150-mtp and enables boot to console, adds > tlmm reserved range, resin node, volume down key and also includes pmic > file. > > Signed-off-by: Vinod Koul > --- > arch/arm64/boot/dts/qcom/Makefile |

Re: [PATCH v2 6/8] arm64: dts: qcom: sm8150-mtp: Add regulators

2019-08-20 Thread Niklas Cassel
On Tue, Aug 20, 2019 at 12:12:14PM +0530, Vinod Koul wrote: > Add the regulators found in the mtp platform. This platform consists of > pmic PM8150, PM8150L and PM8009. Is there a reason not to squash this this patch 5/8 ? > > Signed-off-by: Vinod Koul > --- >

Re: [PATCH v2 7/8] arm64: dts: qcom: sm8150: Add reserved-memory regions

2019-08-20 Thread Niklas Cassel
On Tue, Aug 20, 2019 at 12:12:15PM +0530, Vinod Koul wrote: > Add the reserved memory regions in SM8150 Is there a reason not to squash this this patch 1/8 ? > > Signed-off-by: Vinod Koul > --- > arch/arm64/boot/dts/qcom/sm8150.dtsi | 111 +++ > 1 file changed, 111

[PATCH v3 09/14] dt-bindings: opp: Add qcom-opp bindings with properties needed for CPR

2019-08-19 Thread Niklas Cassel
Add qcom-opp bindings with properties needed for Core Power Reduction (CPR). CPR is included in a great variety of Qualcomm SoCs, e.g. msm8916 and msm8996. CPR was first introduced in msm8974. Co-developed-by: Jorge Ramirez-Ortiz Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Niklas Cassel

[PATCH v3 06/14] dt-bindings: cpufreq: qcom-nvmem: Support pstates provided by a power domain

2019-08-19 Thread Niklas Cassel
-off-by: Niklas Cassel Reviewed-by: Rob Herring --- Changes since V2: -Picked up Rob's Reviewed-by on V2. -As Rob pointed out in V1, it should be "In 'cpu' nodes" and not "In 'cpus' nodes". -In Example 2: include the qcom,opp-fuse-level property rather than "...", since

Re: [PATCH] arm64: dts: qcom: qcs404-evb: Mark WCSS clocks protected

2019-08-15 Thread Niklas Cassel
m. > > But on the EVB these registers are only accessible through TrustZone, so > these clocks must be marked as "protected" to prevent the clock code > from touching them. > > Numerical values are used as the constants are not yet available in a > common tree. >

Re: [PATCH 00/15] thermal: qcom: tsens: Add interrupt support

2019-08-12 Thread Niklas Cassel
On Mon, Jul 29, 2019 at 03:20:11PM +0530, Amit Kucheria wrote: > On Mon, Jul 29, 2019 at 3:03 PM Luca Weiss wrote: > > > > On Montag, 29. Juli 2019 11:07:35 CEST Brian Masney wrote: > > > On Sat, Jul 27, 2019 at 12:58:54PM +0530, Amit Kucheria wrote: > > > > On Fri, Jul 26, 2019 at 4:59 PM Brian

[PATCH v2 13/14] arm64: defconfig: enable CONFIG_QCOM_CPR

2019-07-25 Thread Niklas Cassel
Enable CONFIG_QCOM_CPR. Signed-off-by: Niklas Cassel --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 04b7fb26a942..3e7618818250 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64

[PATCH v2 12/14] arm64: dts: qcom: qcs404: Add CPR and populate OPP table

2019-07-25 Thread Niklas Cassel
Add CPR and populate OPP table. Co-developed-by: Jorge Ramirez-Ortiz Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Niklas Cassel --- Changes since V1: -Removed opp-hz from CPR OPP table. arch/arm64/boot/dts/qcom/qcs404.dtsi | 142 +-- 1 file changed, 134

[PATCH v2 09/14] dt-bindings: opp: Add qcom-opp bindings with properties needed for CPR

2019-07-25 Thread Niklas Cassel
Add qcom-opp bindings with properties needed for Core Power Reduction (CPR). CPR is included in a great variety of Qualcomm SoCs, e.g. msm8916 and msm8996. CPR was first introduced in msm8974. Co-developed-by: Jorge Ramirez-Ortiz Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Niklas Cassel

[PATCH v2 10/14] dt-bindings: power: avs: Add support for CPR (Core Power Reduction)

2019-07-25 Thread Niklas Cassel
Add DT bindings to describe the CPR HW found on certain Qualcomm SoCs. Co-developed-by: Jorge Ramirez-Ortiz Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Niklas Cassel Reviewed-by: Rob Herring --- Changes since V1: -Picked up tags. .../bindings/power/avs/qcom,cpr.txt | 193

[PATCH v2 14/14] arm64: defconfig: enable CONFIG_ARM_QCOM_CPUFREQ_NVMEM

2019-07-25 Thread Niklas Cassel
Enable CONFIG_ARM_QCOM_CPUFREQ_NVMEM. Signed-off-by: Niklas Cassel --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index 3e7618818250..9b0cc49f5fe8 100644 --- a/arch/arm64/configs/defconfig +++ b

[PATCH v2 08/14] cpufreq: Add qcs404 to cpufreq-dt-platdev blacklist

2019-07-25 Thread Niklas Cassel
From: Jorge Ramirez-Ortiz Add qcs404 to cpufreq-dt-platdev blacklist. Signed-off-by: Jorge Ramirez-Ortiz Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel --- drivers/cpufreq/cpufreq-dt-platdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/cpufreq-dt

[PATCH v2 11/14] power: avs: Add support for CPR (Core Power Reduction)

2019-07-25 Thread Niklas Cassel
by others on codeaurora.org[2]. [1] https://lkml.org/lkml/2015/9/18/833 [2] https://www.codeaurora.org/cgit/quic/la/kernel/msm-3.10/tree/drivers/regulator/cpr-regulator.c?h=msm-3.10 Co-developed-by: Jorge Ramirez-Ortiz Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Niklas Cassel --- Change

[PATCH v2 07/14] cpufreq: qcom: Add support for qcs404 on nvmem driver

2019-07-25 Thread Niklas Cassel
-Ortiz Signed-off-by: Niklas Cassel --- Changes since V1: -Adapt to dev_pm_opp_attach_genpd() API change. drivers/cpufreq/qcom-cpufreq-nvmem.c | 50 ++-- 1 file changed, 47 insertions(+), 3 deletions(-) diff --git a/drivers/cpufreq/qcom-cpufreq-nvmem.c b/drivers/cpufreq

[PATCH v2 06/14] dt-bindings: cpufreq: qcom-nvmem: Support pstates provided by a power domain

2019-07-25 Thread Niklas Cassel
-off-by: Niklas Cassel --- .../bindings/opp/qcom-nvmem-cpufreq.txt | 111 ++ 1 file changed, 111 insertions(+) diff --git a/Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt b/Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt index c5ea8b90e35d

[PATCH v2 05/14] cpufreq: qcom: Refactor the driver to make it easier to extend

2019-07-25 Thread Niklas Cassel
only be supported on certain SoCs. Co-developed-by: Jorge Ramirez-Ortiz Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Niklas Cassel Reviewed-by: Ilia Lin --- Changes since V1: -Picked up tags. -Fixed an incorrectly placed of_node_put(). drivers/cpufreq/qcom-cpufreq-nvmem.c | 123

[PATCH v2 04/14] dt-bindings: cpufreq: qcom-nvmem: Make speedbin related properties optional

2019-07-25 Thread Niklas Cassel
Not all Qualcomm platforms need to care about the speedbin efuse, nor the value blown into the speedbin efuse. Therefore, make the nvmem-cells and opp-supported-hw properties optional. Signed-off-by: Niklas Cassel Reviewed-by: Ilia Lin Reviewed-by: Rob Herring --- Changes since V1: -Picked up

[PATCH v2 03/14] cpufreq: qcom: Re-organise kryo cpufreq to use it for other nvmem based qcom socs

2019-07-25 Thread Niklas Cassel
out for reuse. Signed-off-by: Sricharan R [niklas.cas...@linaro.org: split dt-binding into a separate patch and do not rename the compatible string. Update MAINTAINERS file.] Signed-off-by: Niklas Cassel Reviewed-by: Ilia Lin --- Changes since V1: -Picked up tags. -Renamed .driver .name to "

[PATCH v2 02/14] dt-bindings: cpufreq: Re-organise kryo cpufreq to use it for other nvmem based qcom socs

2019-07-25 Thread Niklas Cassel
out for reuse. Signed-off-by: Sricharan R [niklas.cas...@linaro.org: split dt-binding into a separate patch and do not rename the compatible string.] Signed-off-by: Niklas Cassel Reviewed-by: Ilia Lin Reviewed-by: Rob Herring --- Changes since V1: -Picked up tags. .../opp/{kryo-cpufreq.txt

[PATCH v2 00/14] Add support for QCOM Core Power Reduction

2019-07-25 Thread Niklas Cassel
, check the "Changes since V1" as comments in the individual patches, where applicable. Jorge Ramirez-Ortiz (1): cpufreq: Add qcs404 to cpufreq-dt-platdev blacklist Niklas Cassel (11): opp: Add dev_pm_opp_find_level_exact() dt-bindings: cpufreq: qcom-nvmem: Make speedbin related

[PATCH v2 01/14] opp: Add dev_pm_opp_find_level_exact()

2019-07-25 Thread Niklas Cassel
-off-by: Niklas Cassel --- drivers/opp/core.c | 48 ++ include/linux/pm_opp.h | 8 +++ 2 files changed, 56 insertions(+) diff --git a/drivers/opp/core.c b/drivers/opp/core.c index cac3e4005045..3b7ffd0234e9 100644 --- a/drivers/opp/core.c +++ b

Re: [PATCH 11/13] arm64: dts: qcom: qcs404: Add CPR and populate OPP table

2019-07-25 Thread Niklas Cassel
On Tue, Jul 23, 2019 at 07:26:35AM +0530, Viresh Kumar wrote: > On 19-07-19, 17:45, Niklas Cassel wrote: > > Hello Viresh, > > > > Could you please have a look at the last two patches here: > > https://git.linaro.org/people/niklas.cassel/kernel.git/log/?h=cpr-opp-h

Re: [PATCH 11/13] arm64: dts: qcom: qcs404: Add CPR and populate OPP table

2019-07-19 Thread Niklas Cassel
On Wed, Jul 17, 2019 at 10:19:23AM +0530, Viresh Kumar wrote: > On 16-07-19, 12:53, Niklas Cassel wrote: > > Here I cheated and simply used get_cpu_device(0). > > > > Since I cheated, I used get_cpu_device(0) always, > > so even when CPU1,CPU2,CPU3 is attached, de

Re: [PATCH 02/13] cpufreq: qcom: Re-organise kryo cpufreq to use it for other nvmem based qcom socs

2019-07-16 Thread Niklas Cassel
On Wed, Jul 10, 2019 at 11:48:39AM +0530, Viresh Kumar wrote: > On 05-07-19, 11:57, Niklas Cassel wrote: > > -static struct platform_driver qcom_cpufreq_kryo_driver = { > > - .probe = qcom_cpufreq_kryo_probe, > > - .remove = qcom_cpufreq_kryo_remove, > > +st

Re: [PATCH 04/13] cpufreq: qcom: Refactor the driver to make it easier to extend

2019-07-16 Thread Niklas Cassel
On Wed, Jul 10, 2019 at 12:00:26PM +0530, Viresh Kumar wrote: > On 05-07-19, 11:57, Niklas Cassel wrote: > > + drv->opp_tables = kcalloc(num_possible_cpus(), sizeof(*drv->opp_tables), > > + GFP_KERNEL); > > + if (!drv->opp_tables) {

Re: [PATCH 11/13] arm64: dts: qcom: qcs404: Add CPR and populate OPP table

2019-07-16 Thread Niklas Cassel
On Tue, Jul 16, 2019 at 04:04:36PM +0530, Viresh Kumar wrote: > On 15-07-19, 15:24, Niklas Cassel wrote: > > This was actually my initial thought when talking to you 6+ months ago. > > However, the problem was that, from the CPR drivers' perspective, it > > only s

Re: [PATCH] opp: Return genpd virtual devices from dev_pm_opp_attach_genpd()

2019-07-16 Thread Niklas Cassel
On Mon, Jul 08, 2019 at 11:30:11AM +0530, Viresh Kumar wrote: > The cpufreq drivers don't need to do runtime PM operations on the > virtual devices returned by dev_pm_domain_attach_by_name() and so the > virtual devices weren't shared with the callers of > dev_pm_opp_attach_genpd() earlier. > >

Re: [PATCH 11/13] arm64: dts: qcom: qcs404: Add CPR and populate OPP table

2019-07-15 Thread Niklas Cassel
On Wed, Jul 10, 2019 at 02:33:03PM +0530, Viresh Kumar wrote: > On 05-07-19, 11:57, Niklas Cassel wrote: > > diff --git a/arch/arm64/boot/dts/qcom/qcs404.dtsi > > b/arch/arm64/boot/dts/qcom/qcs404.dtsi > > cpu_opp_table: cpu-opp-table { > > - compat

Re: [RFC PATCH 6/9] dt-bindings: opp: Add qcom-opp bindings with properties needed for CPR

2019-07-05 Thread Niklas Cassel
On Tue, Apr 09, 2019 at 02:53:52PM +0530, Viresh Kumar wrote: > On 04-04-19, 07:09, Niklas Cassel wrote: > > Add qcom-opp bindings with properties needed for Core Power Reduction (CPR). > > > > CPR is included in a great variety of Qualcomm SoC, e.g. msm8916 and > >

[PATCH 03/13] dt-bindings: cpufreq: qcom-nvmem: Make speedbin related properties optional

2019-07-05 Thread Niklas Cassel
Not all Qualcomm platforms need to care about the speedbin efuse, nor the value blown into the speedbin efuse. Therefore, make the nvmem-cells and opp-supported-hw properties optional. Signed-off-by: Niklas Cassel --- Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt | 4 1 file

[PATCH 06/13] cpufreq: qcom: Add support for qcs404 on nvmem driver

2019-07-05 Thread Niklas Cassel
-Ortiz Signed-off-by: Niklas Cassel --- Changes since RFC: -Remove empty stub. -Add power domain attach as a feature in the match_data struct. -Failing to attach to the power domain is treated as a hard error. drivers/cpufreq/qcom-cpufreq-nvmem.c | 49 ++-- 1 file changed

[PATCH 05/13] dt-bindings: cpufreq: qcom-nvmem: Support pstates provided by a power domain

2019-07-05 Thread Niklas Cassel
-off-by: Niklas Cassel --- .../bindings/opp/qcom-nvmem-cpufreq.txt | 111 ++ 1 file changed, 111 insertions(+) diff --git a/Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt b/Documentation/devicetree/bindings/opp/qcom-nvmem-cpufreq.txt index c5ea8b90e35d

[PATCH 11/13] arm64: dts: qcom: qcs404: Add CPR and populate OPP table

2019-07-05 Thread Niklas Cassel
Add CPR and populate OPP table. Co-developed-by: Jorge Ramirez-Ortiz Signed-off-by: Jorge Ramirez-Ortiz Signed-off-by: Niklas Cassel --- arch/arm64/boot/dts/qcom/qcs404.dtsi | 145 +-- 1 file changed, 137 insertions(+), 8 deletions(-) diff --git a/arch/arm64/boot/dts

[PATCH 07/13] cpufreq: Add qcs404 to cpufreq-dt-platdev blacklist

2019-07-05 Thread Niklas Cassel
From: Jorge Ramirez-Ortiz Add qcs404 to cpufreq-dt-platdev blacklist. Signed-off-by: Jorge Ramirez-Ortiz Co-developed-by: Niklas Cassel Signed-off-by: Niklas Cassel --- drivers/cpufreq/cpufreq-dt-platdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/cpufreq-dt

[PATCH 12/13] arm64: defconfig: enable CONFIG_QCOM_CPR

2019-07-05 Thread Niklas Cassel
Enable CONFIG_QCOM_CPR. Signed-off-by: Niklas Cassel --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig index bfadf18e71c2..d1e8ad5d3079 100644 --- a/arch/arm64/configs/defconfig +++ b/arch/arm64

  1   2   3   4   5   6   7   8   9   10   >