All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] irqchip: Add IRQCHIP_PLATFORM_DRIVER_BEGIN/END and IRQCHIP_MATCH helper macros
From: Saravana Kannan @ 2020-07-17  2:44 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper, Marc Zyngier, Matthias Brugger
  Cc: Saravana Kannan, John Stultz, CC Hwang, Loda Chou, Hanks Chen,
	kernel-team, linux-kernel, linux-arm-kernel, linux-mediatek

Compiling an irqchip driver as a platform driver needs to bunch of
things to be done right:
- Making sure the parent domain is initialized first
- Making sure the device can't be unbound from sysfs
- Disallowing module unload if it's built as a module
- Finding the parent node
- Etc.

Instead of trying to make sure all future irqchip platform drivers get
this right, provide boilerplate macros that take care of all of this.

An example use would look something like this. Where acme_foo_init and
acme_bar_init are similar to what would be passed to IRQCHIP_DECLARE.

IRQCHIP_PLATFORM_DRIVER_BEGIN
IRQCHIP_MATCH(foo, "acme,foo", acme_foo_init)
IRQCHIP_MATCH(bar, "acme,bar", acme_bar_init)
IRQCHIP_PLATFORM_DRIVER_END(acme_irq)

Signed-off-by: Saravana Kannan <saravanak@google.com>
---
 drivers/irqchip/irqchip.c | 22 ++++++++++++++++++++++
 include/linux/irqchip.h   | 23 +++++++++++++++++++++++
 2 files changed, 45 insertions(+)

diff --git a/drivers/irqchip/irqchip.c b/drivers/irqchip/irqchip.c
index 2b35e68bea82..236ea793f01c 100644
--- a/drivers/irqchip/irqchip.c
+++ b/drivers/irqchip/irqchip.c
@@ -10,8 +10,10 @@
 
 #include <linux/acpi.h>
 #include <linux/init.h>
+#include <linux/of_device.h>
 #include <linux/of_irq.h>
 #include <linux/irqchip.h>
+#include <linux/platform_device.h>
 
 /*
  * This special of_device_id is the sentinel at the end of the
@@ -29,3 +31,23 @@ void __init irqchip_init(void)
 	of_irq_init(__irqchip_of_table);
 	acpi_probe_device_table(irqchip);
 }
+
+int platform_irqchip_probe(struct platform_device *pdev)
+{
+	struct device_node *np = pdev->dev.of_node;
+	struct device_node *par_np = of_irq_find_parent(np);
+	of_irq_init_cb_t irq_init_cb = of_device_get_match_data(&pdev->dev);
+
+	if (!irq_init_cb)
+		return -EINVAL;
+
+	if (par_np == np)
+		par_np = NULL;
+
+	/* If there's a parent irqchip, make sure it has been initialized. */
+	if (par_np && !irq_find_matching_host(np, DOMAIN_BUS_ANY))
+		return -EPROBE_DEFER;
+
+	return irq_init_cb(np, par_np);
+}
+EXPORT_SYMBOL_GPL(platform_irqchip_probe);
diff --git a/include/linux/irqchip.h b/include/linux/irqchip.h
index 950e4b2458f0..6d5eba7cbbb7 100644
--- a/include/linux/irqchip.h
+++ b/include/linux/irqchip.h
@@ -13,6 +13,7 @@
 
 #include <linux/acpi.h>
 #include <linux/of.h>
+#include <linux/platform_device.h>
 
 /*
  * This macro must be used by the different irqchip drivers to declare
@@ -26,6 +27,28 @@
  */
 #define IRQCHIP_DECLARE(name, compat, fn) OF_DECLARE_2(irqchip, name, compat, fn)
 
+extern int platform_irqchip_probe(struct platform_device *pdev);
+
+#define IRQCHIP_PLATFORM_DRIVER_BEGIN \
+static const struct of_device_id __irqchip_match_table[] = {
+
+#define IRQCHIP_MATCH(compat, fn) { .compatible = compat, .data = fn },
+
+#define IRQCHIP_PLATFORM_DRIVER_END(drv_name)		\
+	{},						\
+};							\
+MODULE_DEVICE_TABLE(of, __irqchip_match_table);		\
+static struct platform_driver drv_name##_driver = {	\
+	.probe  = platform_irqchip_probe,		\
+	.driver = {					\
+		.name = #drv_name,			\
+		.owner = THIS_MODULE,			\
+		.of_match_table = __irqchip_match_table,\
+		.suppress_bind_attrs = true,		\
+	},						\
+};							\
+builtin_platform_driver(drv_name##_driver)
+
 /*
  * This macro must be used by the different irqchip drivers to declare
  * the association between their version and their initialization function.
-- 
2.28.0.rc0.105.gf9edc3c819-goog


^ permalink raw reply related

* Re: [PATCH v3 0/3] Off-load TLB invalidations to host for !GTSE
From: Nicholas Piggin @ 2020-07-17  2:44 UTC (permalink / raw)
  To: Bharata B Rao, Qian Cai
  Cc: aneesh.kumar, linux-kernel, linux-next, linuxppc-dev, mpe, sfr
In-Reply-To: <1594950229.jn9ipe6td1.astroid@bobo.none>

Excerpts from Nicholas Piggin's message of July 17, 2020 12:08 pm:
> Excerpts from Qian Cai's message of July 17, 2020 3:27 am:
>> On Fri, Jul 03, 2020 at 11:06:05AM +0530, Bharata B Rao wrote:
>>> Hypervisor may choose not to enable Guest Translation Shootdown Enable
>>> (GTSE) option for the guest. When GTSE isn't ON, the guest OS isn't
>>> permitted to use instructions like tblie and tlbsync directly, but is
>>> expected to make hypervisor calls to get the TLB flushed.
>>> 
>>> This series enables the TLB flush routines in the radix code to
>>> off-load TLB flushing to hypervisor via the newly proposed hcall
>>> H_RPT_INVALIDATE. 
>>> 
>>> To easily check the availability of GTSE, it is made an MMU feature.
>>> The OV5 handling and H_REGISTER_PROC_TBL hcall are changed to
>>> handle GTSE as an optionally available feature and to not assume GTSE
>>> when radix support is available.
>>> 
>>> The actual hcall implementation for KVM isn't included in this
>>> patchset and will be posted separately.
>>> 
>>> Changes in v3
>>> =============
>>> - Fixed a bug in the hcall wrapper code where we were missing setting
>>>   H_RPTI_TYPE_NESTED while retrying the failed flush request with
>>>   a full flush for the nested case.
>>> - s/psize_to_h_rpti/psize_to_rpti_pgsize
>>> 
>>> v2: https://lore.kernel.org/linuxppc-dev/20200626131000.5207-1-bharata@linux.ibm.com/T/#t
>>> 
>>> Bharata B Rao (2):
>>>   powerpc/mm: Enable radix GTSE only if supported.
>>>   powerpc/pseries: H_REGISTER_PROC_TBL should ask for GTSE only if
>>>     enabled
>>> 
>>> Nicholas Piggin (1):
>>>   powerpc/mm/book3s64/radix: Off-load TLB invalidations to host when
>>>     !GTSE
>> 
>> Reverting the whole series fixed random memory corruptions during boot on
>> POWER9 PowerNV systems below.
> 
> If I s/mmu_has_feature(MMU_FTR_GTSE)/(1)/g in radix_tlb.c, then the .o
> disasm is the same as reverting my patch.
> 
> Feature bits not being set right? PowerNV should be pretty simple, seems
> to do the same as FTR_TYPE_RADIX.

Might need this fix

---

diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 9cc49f265c86..54c9bcea9d4e 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -163,7 +163,7 @@ static struct ibm_pa_feature {
 	{ .pabyte = 0,  .pabit = 6, .cpu_features  = CPU_FTR_NOEXECUTE },
 	{ .pabyte = 1,  .pabit = 2, .mmu_features  = MMU_FTR_CI_LARGE_PAGE },
 #ifdef CONFIG_PPC_RADIX_MMU
-	{ .pabyte = 40, .pabit = 0, .mmu_features  = MMU_FTR_TYPE_RADIX },
+	{ .pabyte = 40, .pabit = 0, .mmu_features  = (MMU_FTR_TYPE_RADIX | MMU_FTR_GTSE) },
 #endif
 	{ .pabyte = 1,  .pabit = 1, .invert = 1, .cpu_features = CPU_FTR_NODSISRALIGN },
 	{ .pabyte = 5,  .pabit = 0, .cpu_features  = CPU_FTR_REAL_LE,

^ permalink raw reply related

* [PATCH v3 2/2] block: improve discard bio alignment in __blkdev_issue_discard()
From: Coly Li @ 2020-07-17  2:42 UTC (permalink / raw)
  To: axboe, linux-block
  Cc: martin.petersen, linux-bcache, linux-kernel, Coly Li,
	Acshai Manoj, Hannes Reinecke, Ming Lei, Xiao Ni, Bart Van Assche,
	Christoph Hellwig, Enzo Matsumiya
In-Reply-To: <20200717024230.33116-1-colyli@suse.de>

This patch improves discard bio split for address and size alignment in
__blkdev_issue_discard(). The aligned discard bio may help underlying
device controller to perform better discard and internal garbage
collection, and avoid unnecessary internal fragment.

Current discard bio split algorithm in __blkdev_issue_discard() may have
non-discarded fregment on device even the discard bio LBA and size are
both aligned to device's discard granularity size.

Here is the example steps on how to reproduce the above problem.
- On a VMWare ESXi 6.5 update3 installation, create a 51GB virtual disk
  with thin mode and give it to a Linux virtual machine.
- Inside the Linux virtual machine, if the 50GB virtual disk shows up as
  /dev/sdb, fill data into the first 50GB by,
        # dd if=/dev/zero of=/dev/sdb bs=4096 count=13107200
- Discard the 50GB range from offset 0 on /dev/sdb,
        # blkdiscard /dev/sdb -o 0 -l 53687091200
- Observe the underlying mapping status of the device
        # sg_get_lba_status /dev/sdb -m 1048 --lba=0
  descriptor LBA: 0x0000000000000000  blocks: 2048  mapped (or unknown)
  descriptor LBA: 0x0000000000000800  blocks: 16773120  deallocated
  descriptor LBA: 0x0000000000fff800  blocks: 2048  mapped (or unknown)
  descriptor LBA: 0x0000000001000000  blocks: 8386560  deallocated
  descriptor LBA: 0x00000000017ff800  blocks: 2048  mapped (or unknown)
  descriptor LBA: 0x0000000001800000  blocks: 8386560  deallocated
  descriptor LBA: 0x0000000001fff800  blocks: 2048  mapped (or unknown)
  descriptor LBA: 0x0000000002000000  blocks: 8386560  deallocated
  descriptor LBA: 0x00000000027ff800  blocks: 2048  mapped (or unknown)
  descriptor LBA: 0x0000000002800000  blocks: 8386560  deallocated
  descriptor LBA: 0x0000000002fff800  blocks: 2048  mapped (or unknown)
  descriptor LBA: 0x0000000003000000  blocks: 8386560  deallocated
  descriptor LBA: 0x00000000037ff800  blocks: 2048  mapped (or unknown)
  descriptor LBA: 0x0000000003800000  blocks: 8386560  deallocated
  descriptor LBA: 0x0000000003fff800  blocks: 2048  mapped (or unknown)
  descriptor LBA: 0x0000000004000000  blocks: 8386560  deallocated
  descriptor LBA: 0x00000000047ff800  blocks: 2048  mapped (or unknown)
  descriptor LBA: 0x0000000004800000  blocks: 8386560  deallocated
  descriptor LBA: 0x0000000004fff800  blocks: 2048  mapped (or unknown)
  descriptor LBA: 0x0000000005000000  blocks: 8386560  deallocated
  descriptor LBA: 0x00000000057ff800  blocks: 2048  mapped (or unknown)
  descriptor LBA: 0x0000000005800000  blocks: 8386560  deallocated
  descriptor LBA: 0x0000000005fff800  blocks: 2048  mapped (or unknown)
  descriptor LBA: 0x0000000006000000  blocks: 6291456  deallocated
  descriptor LBA: 0x0000000006600000  blocks: 0  deallocated

Although the discard bio starts at LBA 0 and has 50<<30 bytes size which
are perfect aligned to the discard granularity, from the above list
these are many 1MB (2048 sectors) internal fragments exist unexpectedly.

The problem is in __blkdev_issue_discard(), an improper algorithm causes
an improper bio size which is not aligned.

 25 int __blkdev_issue_discard(struct block_device *bdev, sector_t sector,
 26                 sector_t nr_sects, gfp_t gfp_mask, int flags,
 27                 struct bio **biop)
 28 {
 29         struct request_queue *q = bdev_get_queue(bdev);
   [snipped]
 56
 57         while (nr_sects) {
 58                 sector_t req_sects = min_t(sector_t, nr_sects,
 59                                 bio_allowed_max_sectors(q));
 60
 61                 WARN_ON_ONCE((req_sects << 9) > UINT_MAX);
 62
 63                 bio = blk_next_bio(bio, 0, gfp_mask);
 64                 bio->bi_iter.bi_sector = sector;
 65                 bio_set_dev(bio, bdev);
 66                 bio_set_op_attrs(bio, op, 0);
 67
 68                 bio->bi_iter.bi_size = req_sects << 9;
 69                 sector += req_sects;
 70                 nr_sects -= req_sects;
   [snipped]
 79         }
 80
 81         *biop = bio;
 82         return 0;
 83 }
 84 EXPORT_SYMBOL(__blkdev_issue_discard);

At line 58-59, to discard a 50GB range, req_sects is set as return value
of bio_allowed_max_sectors(q), which is 8388607 sectors. In the above
case, the discard granularity is 2048 sectors, although the start LBA
and discard length are aligned to discard granularity, req_sects never
has chance to be aligned to discard granularity. This is why there are
some still-mapped 2048 sectors fragment in every 4 or 8 GB range.

If req_sects at line 58 is set to a value aligned to discard_granularity
and close to UNIT_MAX, then all consequent split bios inside device
driver are (almostly) aligned to discard_granularity of the device
queue. The 2048 sectors still-mapped fragment will disappear.

This patch introduces bio_aligned_discard_max_sectors() to return the
the value which is aligned to q->limits.discard_granularity and closest
to UINT_MAX. Then this patch replaces bio_allowed_max_sectors() with
this new routine to decide a more proper split bio length.

But we still need to handle the situation when discard start LBA is not
aligned to q->limits.discard_granularity, otherwise even the length is
aligned, current code may still leave 2048 fragment around every 4GB
range. Therefore, to calculate req_sects, firstly the start LBA of
discard range is checked (including partition offset), if it is not
aligned to discard granularity, the first split location should make
sure following bio has bi_sector aligned to discard granularity. Then
there won't be still-mapped fragment in the middle of the discard range.

The above is how this patch improves discard bio alignment in
__blkdev_issue_discard(). Now with this patch, after discard with same
command line mentiond previously, sg_get_lba_status returns,
descriptor LBA: 0x0000000000000000  blocks: 106954752  deallocated
descriptor LBA: 0x0000000006600000  blocks: 0  deallocated

We an see there is no 2048 sectors segment anymore, everything is clean.

Reported-and-tested-by: Acshai Manoj <acshai.manoj@microfocus.com>
Signed-off-by: Coly Li <colyli@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Xiao Ni <xni@redhat.com>
Cc: Bart Van Assche <bvanassche@acm.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Enzo Matsumiya <ematsumiya@suse.com>
Cc: Jens Axboe <axboe@kernel.dk>
---
Changelog:
v3: handle partition offset suggested by Martin.
v2: fix the overflow pointed by Ming Lei.
v1: initial version.

 block/blk-lib.c | 31 ++++++++++++++++++++++++++++---
 block/blk.h     | 14 ++++++++++++++
 2 files changed, 42 insertions(+), 3 deletions(-)

diff --git a/block/blk-lib.c b/block/blk-lib.c
index 5f2c429d4378..019e09bb9c0e 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -29,7 +29,7 @@ int __blkdev_issue_discard(struct block_device *bdev, sector_t sector,
 	struct request_queue *q = bdev_get_queue(bdev);
 	struct bio *bio = *biop;
 	unsigned int op;
-	sector_t bs_mask;
+	sector_t bs_mask, part_offset = 0;
 
 	if (!q)
 		return -ENXIO;
@@ -54,9 +54,34 @@ int __blkdev_issue_discard(struct block_device *bdev, sector_t sector,
 	if (!nr_sects)
 		return -EINVAL;
 
+	/* In case the discard request is in a partition */
+	if (bdev->bd_partno)
+		part_offset = bdev->bd_part->start_sect;
+
 	while (nr_sects) {
-		sector_t req_sects = min_t(sector_t, nr_sects,
-				bio_allowed_max_sectors(q));
+		sector_t granularity_aligned_lba, req_sects;
+		sector_t sector_mapped = sector + part_offset;
+
+		granularity_aligned_lba = round_up(sector_mapped,
+				q->limits.discard_granularity >> SECTOR_SHIFT);
+
+		/*
+		 * Check whether the discard bio starts at a discard_granularity
+		 * aligned LBA,
+		 * - If no: set (granularity_aligned_lba - sector_mapped) to
+		 *   bi_size of the first split bio, then the second bio will
+		 *   start at a discard_granularity aligned LBA on the device.
+		 * - If yes: use bio_aligned_discard_max_sectors() as the max
+		 *   possible bi_size of the first split bio. Then when this bio
+		 *   is split in device drive, the split ones are very probably
+		 *   to be aligned to discard_granularity of the device's queue.
+		 */
+		if (granularity_aligned_lba == sector_mapped)
+			req_sects = min_t(sector_t, nr_sects,
+					  bio_aligned_discard_max_sectors(q));
+		else
+			req_sects = min_t(sector_t, nr_sects,
+					  granularity_aligned_lba - sector_mapped);
 
 		WARN_ON_ONCE((req_sects << 9) > UINT_MAX);
 
diff --git a/block/blk.h b/block/blk.h
index b5d1f0fc6547..a80738581f84 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -281,6 +281,20 @@ static inline unsigned int bio_allowed_max_sectors(struct request_queue *q)
 	return round_down(UINT_MAX, queue_logical_block_size(q)) >> 9;
 }
 
+/*
+ * The max bio size which is aligned to q->limits.discard_granularity. This
+ * is a hint to split large discard bio in generic block layer, then if device
+ * driver needs to split the discard bio into smaller ones, their bi_size can
+ * be very probably and easily aligned to discard_granularity of the device's
+ * queue.
+ */
+static inline unsigned int bio_aligned_discard_max_sectors(
+					struct request_queue *q)
+{
+	return round_down(UINT_MAX, q->limits.discard_granularity) >>
+			SECTOR_SHIFT;
+}
+
 /*
  * Internal io_context interface
  */
-- 
2.26.2


^ permalink raw reply related

* [PATCH v3 1/2] block: change REQ_OP_ZONE_RESET and REQ_OP_ZONE_RESET_ALL to be odd numbers
From: Coly Li @ 2020-07-17  2:42 UTC (permalink / raw)
  To: axboe, linux-block
  Cc: martin.petersen, linux-bcache, linux-kernel, Coly Li,
	Damien Le Moal, Chaitanya Kulkarni, Christoph Hellwig,
	Hannes Reinecke, Jens Axboe, Johannes Thumshirn, Keith Busch,
	Shaun Tancheff
In-Reply-To: <20200717024230.33116-1-colyli@suse.de>

Currently REQ_OP_ZONE_RESET and REQ_OP_ZONE_RESET_ALL are defined as
even numbers 6 and 8, such zone reset bios are treated as READ bios by
bio_data_dir(), which is obviously misleading.

The macro bio_data_dir() is defined in include/linux/bio.h as,
 55 #define bio_data_dir(bio) \
 56         (op_is_write(bio_op(bio)) ? WRITE : READ)

And op_is_write() is defined in include/linux/blk_types.h as,
397 static inline bool op_is_write(unsigned int op)
398 {
399         return (op & 1);
400 }

The convention of op_is_write() is when there is data transfer then the
op code should be odd number, and treat as a write op. bio_data_dir()
treats all bio direction as READ if op_is_write() reports false, and
WRITE if op_is_write() reports true.

Because REQ_OP_ZONE_RESET and REQ_OP_ZONE_RESET_ALL are even numbers,
although they don't transfer data but reporting them as READ bio by
bio_data_dir() is misleading and might be wrong. Because these two
commands will reset the writer pointers of the resetting zones, and all
content after the reset write pointer will be invalid and unaccessible,
obviously they are not READ bios in any means.

This patch changes REQ_OP_ZONE_RESET from 6 to 15, and changes
REQ_OP_ZONE_RESET_ALL from 8 to 17. Now bios with these two op code
can be treated as WRITE by bio_data_dir(). Although they don't transfer
data, now we keep them consistent with REQ_OP_DISCARD and
REQ_OP_WRITE_ZEROES with the ituition that they change on-media content
and should be WRITE request.

Signed-off-by: Coly Li <colyli@suse.de>
Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Hannes Reinecke <hare@suse.de>
Cc: Jens Axboe <axboe@fb.com>
Cc: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Cc: Keith Busch <kbusch@kernel.org>
Cc: Shaun Tancheff <shaun.tancheff@seagate.com>
---
 include/linux/blk_types.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/blk_types.h b/include/linux/blk_types.h
index ccb895f911b1..447b46a0accf 100644
--- a/include/linux/blk_types.h
+++ b/include/linux/blk_types.h
@@ -300,12 +300,8 @@ enum req_opf {
 	REQ_OP_DISCARD		= 3,
 	/* securely erase sectors */
 	REQ_OP_SECURE_ERASE	= 5,
-	/* reset a zone write pointer */
-	REQ_OP_ZONE_RESET	= 6,
 	/* write the same sector many times */
 	REQ_OP_WRITE_SAME	= 7,
-	/* reset all the zone present on the device */
-	REQ_OP_ZONE_RESET_ALL	= 8,
 	/* write the zero filled sector many times */
 	REQ_OP_WRITE_ZEROES	= 9,
 	/* Open a zone */
@@ -316,6 +312,10 @@ enum req_opf {
 	REQ_OP_ZONE_FINISH	= 12,
 	/* write data at the current zone write pointer */
 	REQ_OP_ZONE_APPEND	= 13,
+	/* reset a zone write pointer */
+	REQ_OP_ZONE_RESET	= 15,
+	/* reset all the zone present on the device */
+	REQ_OP_ZONE_RESET_ALL	= 17,
 
 	/* SCSI passthrough using struct scsi_request */
 	REQ_OP_SCSI_IN		= 32,
-- 
2.26.2


^ permalink raw reply related

* Re: [PATCH -next] bcache: Convert to DEFINE_SHOW_ATTRIBUTE
From: miaoqinglang @ 2020-07-17  2:42 UTC (permalink / raw)
  To: Coly Li
  Cc: Greg Kroah-Hartman, Kent Overstreet, linux-tegra, linux-kernel,
	liuyongqiang13
In-Reply-To: <639a9561-2824-b668-42b3-b69f016f54e1@suse.de>



在 2020/7/17 10:22, Coly Li 写道:
> On 2020/7/16 17:54, Coly Li wrote:
>> On 2020/7/16 17:03, Qinglang Miao wrote:
>>> From: Yongqiang Liu <liuyongqiang13@huawei.com>
>>>
>>
>> Hi Qianlang and Yongqiang,
>>
>>> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>>>
>>> Signed-off-by: Yongqiang Liu <liuyongqiang13@huawei.com>
>>> ---
>>>   drivers/md/bcache/closure.c | 16 +++-------------
>>>   1 file changed, 3 insertions(+), 13 deletions(-)
>>>
>>> diff --git a/drivers/md/bcache/closure.c b/drivers/md/bcache/closure.c
>>> index 99222aa5d..37b9c5d49 100644
>>> --- a/drivers/md/bcache/closure.c
>>> +++ b/drivers/md/bcache/closure.c
>>> @@ -159,7 +159,7 @@ void closure_debug_destroy(struct closure *cl)
>>>   
>>>   static struct dentry *closure_debug;
>>>   
>>> -static int debug_seq_show(struct seq_file *f, void *data)
>>> +static int debug_show(struct seq_file *f, void *data)
>>>   {
>>>   	struct closure *cl;
>>>   
>>> @@ -188,17 +188,7 @@ static int debug_seq_show(struct seq_file *f, void *data)
>>>   	return 0;
>>>   }
>>>   
>>> -static int debug_seq_open(struct inode *inode, struct file *file)
>>> -{
>>> -	return single_open(file, debug_seq_show, NULL);
>>> -}
>>> -
>>
>> Here NULL is sent to single_open(), in DEFINE_SHOW_ATTRIBUTE()
>> inode->i_private is sent into single_open(). I don't see the commit log
>> mentions or estimates such change.
>>
> 
> Still this change modifies original code logic, I need to know the exact
> effect before taking this patch.I've noticed this diffrence and I'm testing bcache on a new qemu 
environment with this patch applied.
> 
>>
>>> -static const struct file_operations debug_ops = {
>>> -	.owner		= THIS_MODULE,
>>> -	.open		= debug_seq_open,
>>> -	.read_iter		= seq_read_iter,
>>
>> I doubt this patch applies to Linux v5.8-rc, this is how debug_ops is
>> defined in Linux v5.8-rc5,
>>
> 
> I realize your patch is against linux-next, which is ahead of both
> linux-block and mainline tree. So this patch does not apply to
> linux-block tree, which is my upstream for bcache going to upstream.
> 
> I suggest to generate the patch against latest mainline kernel, or
> linux-block branch for next merge window (for 5.9 it is branch
> remotes/origin/for-5.9/drivers).
> 
Yes you're right, this patch is based on linux-next with commit 
<4d4901c6d7>. Sorry I didn't mention it in commit log.
> 
>> 196 static const struct file_operations debug_ops = {
>> 197         .owner          = THIS_MODULE,
>> 198         .open           = debug_seq_open,
>> 199         .read           = seq_read,
>> 200         .release        = single_release
>> 201 };
>>
>>> -	.release	= single_release
>>> -};
>>> +DEFINE_SHOW_ATTRIBUTE(debug);
>>>   
>>>   void  __init closure_debug_init(void)
>>>   {
>>> @@ -209,7 +199,7 @@ void  __init closure_debug_init(void)
>>>   		 * about this.
>>>   		 */
>>>   		closure_debug = debugfs_create_file(
>>> -			"closures", 0400, bcache_debug, NULL, &debug_ops);
>>> +				"closures", 0400, bcache_debug, NULL, &debug_fops);
>>>   }
>>>   #endif
>>
>> Do you test your change with upstream kernel ? Or at least you should
>> try to apply and compile the patch with latest upstream kernel.
> 
> I withdraw the above wrong word, the -next tag in patch subject was
> overlooked by me. Next time I will try to avoid such mistake.
> 
> Coly Li
> 
> 
> .
> 
I will send a new patch based on 5.9 mainline after more detailed 
analysis and test.

Thanks.

Qinglang

.


^ permalink raw reply

* [PATCH v3 0/2] two generic block layer fixes for 5.9
From: Coly Li @ 2020-07-17  2:42 UTC (permalink / raw)
  To: axboe, linux-block; +Cc: martin.petersen, linux-bcache, linux-kernel, Coly Li

Hi Jens,

These two patches are posted for a while, and have reviewed by several
other developers.

Comparing to previous version, now the discard bio alignment patch can
correctly handles partition offset as Martin suggested. I verify it
with 5.8-rc5 kernel on VMware ESXi 6.5. 

Could you please to take them for Linux v5.9 ?

Thanks in advance.

Coly Li 
---

Coly Li (2):
  block: change REQ_OP_ZONE_RESET and REQ_OP_ZONE_RESET_ALL to be odd
    numbers
  block: improve discard bio alignment in __blkdev_issue_discard()

 block/blk-lib.c           | 31 ++++++++++++++++++++++++++++---
 block/blk.h               | 14 ++++++++++++++
 include/linux/blk_types.h |  8 ++++----
 3 files changed, 46 insertions(+), 7 deletions(-)

-- 
2.26.2


^ permalink raw reply

* Re: [PATCH -next] bcache: Convert to DEFINE_SHOW_ATTRIBUTE
From: miaoqinglang @ 2020-07-17  2:42 UTC (permalink / raw)
  To: Coly Li
  Cc: Greg Kroah-Hartman, Kent Overstreet,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	liuyongqiang13-hv44wF8Li93QT0dZR+AlfA
In-Reply-To: <639a9561-2824-b668-42b3-b69f016f54e1-l3A5Bk7waGM@public.gmane.org>



在 2020/7/17 10:22, Coly Li 写道:
> On 2020/7/16 17:54, Coly Li wrote:
>> On 2020/7/16 17:03, Qinglang Miao wrote:
>>> From: Yongqiang Liu <liuyongqiang13-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
>>>
>>
>> Hi Qianlang and Yongqiang,
>>
>>> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>>>
>>> Signed-off-by: Yongqiang Liu <liuyongqiang13-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
>>> ---
>>>   drivers/md/bcache/closure.c | 16 +++-------------
>>>   1 file changed, 3 insertions(+), 13 deletions(-)
>>>
>>> diff --git a/drivers/md/bcache/closure.c b/drivers/md/bcache/closure.c
>>> index 99222aa5d..37b9c5d49 100644
>>> --- a/drivers/md/bcache/closure.c
>>> +++ b/drivers/md/bcache/closure.c
>>> @@ -159,7 +159,7 @@ void closure_debug_destroy(struct closure *cl)
>>>   
>>>   static struct dentry *closure_debug;
>>>   
>>> -static int debug_seq_show(struct seq_file *f, void *data)
>>> +static int debug_show(struct seq_file *f, void *data)
>>>   {
>>>   	struct closure *cl;
>>>   
>>> @@ -188,17 +188,7 @@ static int debug_seq_show(struct seq_file *f, void *data)
>>>   	return 0;
>>>   }
>>>   
>>> -static int debug_seq_open(struct inode *inode, struct file *file)
>>> -{
>>> -	return single_open(file, debug_seq_show, NULL);
>>> -}
>>> -
>>
>> Here NULL is sent to single_open(), in DEFINE_SHOW_ATTRIBUTE()
>> inode->i_private is sent into single_open(). I don't see the commit log
>> mentions or estimates such change.
>>
> 
> Still this change modifies original code logic, I need to know the exact
> effect before taking this patch.I've noticed this diffrence and I'm testing bcache on a new qemu 
environment with this patch applied.
> 
>>
>>> -static const struct file_operations debug_ops = {
>>> -	.owner		= THIS_MODULE,
>>> -	.open		= debug_seq_open,
>>> -	.read_iter		= seq_read_iter,
>>
>> I doubt this patch applies to Linux v5.8-rc, this is how debug_ops is
>> defined in Linux v5.8-rc5,
>>
> 
> I realize your patch is against linux-next, which is ahead of both
> linux-block and mainline tree. So this patch does not apply to
> linux-block tree, which is my upstream for bcache going to upstream.
> 
> I suggest to generate the patch against latest mainline kernel, or
> linux-block branch for next merge window (for 5.9 it is branch
> remotes/origin/for-5.9/drivers).
> 
Yes you're right, this patch is based on linux-next with commit 
<4d4901c6d7>. Sorry I didn't mention it in commit log.
> 
>> 196 static const struct file_operations debug_ops = {
>> 197         .owner          = THIS_MODULE,
>> 198         .open           = debug_seq_open,
>> 199         .read           = seq_read,
>> 200         .release        = single_release
>> 201 };
>>
>>> -	.release	= single_release
>>> -};
>>> +DEFINE_SHOW_ATTRIBUTE(debug);
>>>   
>>>   void  __init closure_debug_init(void)
>>>   {
>>> @@ -209,7 +199,7 @@ void  __init closure_debug_init(void)
>>>   		 * about this.
>>>   		 */
>>>   		closure_debug = debugfs_create_file(
>>> -			"closures", 0400, bcache_debug, NULL, &debug_ops);
>>> +				"closures", 0400, bcache_debug, NULL, &debug_fops);
>>>   }
>>>   #endif
>>
>> Do you test your change with upstream kernel ? Or at least you should
>> try to apply and compile the patch with latest upstream kernel.
> 
> I withdraw the above wrong word, the -next tag in patch subject was
> overlooked by me. Next time I will try to avoid such mistake.
> 
> Coly Li
> 
> 
> .
> 
I will send a new patch based on 5.9 mainline after more detailed 
analysis and test.

Thanks.

Qinglang

.

^ permalink raw reply

* [f2fs-dev] [PATCH v2 7/7] fscrypt: update documentation for direct I/O support
From: Satya Tangirala via Linux-f2fs-devel @ 2020-07-17  1:35 UTC (permalink / raw)
  To: linux-fscrypt, linux-fsdevel, linux-f2fs-devel, linux-ext4
  Cc: linux-xfs, Satya Tangirala
In-Reply-To: <20200717013518.59219-1-satyat@google.com>

Update fscrypt documentation to reflect the addition of direct I/O support
and document the necessary conditions for direct I/O on encrypted files.

Signed-off-by: Satya Tangirala <satyat@google.com>
---
 Documentation/filesystems/fscrypt.rst | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/Documentation/filesystems/fscrypt.rst b/Documentation/filesystems/fscrypt.rst
index f3d87a1a0a7f..95c76a5f0567 100644
--- a/Documentation/filesystems/fscrypt.rst
+++ b/Documentation/filesystems/fscrypt.rst
@@ -1049,8 +1049,10 @@ astute users may notice some differences in behavior:
   may be used to overwrite the source files but isn't guaranteed to be
   effective on all filesystems and storage devices.
 
-- Direct I/O is not supported on encrypted files.  Attempts to use
-  direct I/O on such files will fall back to buffered I/O.
+- Direct I/O is supported on encrypted files only under some circumstances
+  (see `Direct I/O support`_ for details). When these circumstances are not
+  met, attempts to use direct I/O on such files will fall back to buffered
+  I/O.
 
 - The fallocate operations FALLOC_FL_COLLAPSE_RANGE and
   FALLOC_FL_INSERT_RANGE are not supported on encrypted files and will
@@ -1257,6 +1259,20 @@ without the key is subject to change in the future.  It is only meant
 as a way to temporarily present valid filenames so that commands like
 ``rm -r`` work as expected on encrypted directories.
 
+Direct I/O support
+------------------
+
+Direct I/O on encrypted files is supported through blk-crypto. In
+particular, this means the kernel must have CONFIG_BLK_INLINE_ENCRYPTION
+enabled, the filesystem must have had the 'inlinecrypt' mount option
+specified, and either hardware inline encryption must be present, or
+CONFIG_BLK_INLINE_ENCRYPTION_FALLBACK must have been enabled. Further,
+any I/O must be aligned to the filesystem block size (*not* necessarily
+the same as the block device's block size) - in particular, any userspace
+buffer into which data is read/written from must also be aligned to the
+filesystem block size. If any of these conditions isn't met, attempts to do
+direct I/O on an encrypted file will fall back to buffered I/O.
+
 Tests
 =====
 
-- 
2.28.0.rc0.105.gf9edc3c819-goog



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related

* [Ocfs2-devel] [PATCH] ocfs2: fix remounting needed after setfacl command
From: Gang He @ 2020-07-17  2:37 UTC (permalink / raw)
  To: mark, jlbec, joseph.qi; +Cc: Gang He, linux-kernel, ocfs2-devel, akpm

When use setfacl command to change a file's acl, the user cannot
get the latest acl information from the file via getfacl command,
until remounting the file system.
e.g.
setfacl -m u:ivan:rw /ocfs2/ivan
getfacl /ocfs2/ivan
getfacl: Removing leading '/' from absolute path names
file: ocfs2/ivan
owner: root
group: root
user::rw-
group::r--
mask::r--
other::r--

The latest acl record("u:ivan:rw") cannot be returned via getfacl
command until remounting.

Signed-off-by: Gang He <ghe@suse.com>
---
 fs/ocfs2/acl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/ocfs2/acl.c b/fs/ocfs2/acl.c
index bb981ec76456..7b07f5df3a29 100644
--- a/fs/ocfs2/acl.c
+++ b/fs/ocfs2/acl.c
@@ -256,6 +256,8 @@ static int ocfs2_set_acl(handle_t *handle,
 		ret = ocfs2_xattr_set(inode, name_index, "", value, size, 0);
 
 	kfree(value);
+	if (!ret)
+		set_cached_acl(inode, type, acl);
 
 	return ret;
 }
-- 
2.12.3

^ permalink raw reply related

* [dpdk-dev] [PATCH v2] net/ice: fix incorrect Rx/Tx bytes statistics
From: Junyu Jiang @ 2020-07-17  2:17 UTC (permalink / raw)
  To: dev; +Cc: Qi Zhang, Qiming Yang, Junyu Jiang, stable
In-Reply-To: <20200715070307.36814-1-junyux.jiang@intel.com>

This patch fixed the issue that rx/tx bytes overflowed
on 40 bit limitation by enlarging the limitation.

Fixes: a37bde56314d ("net/ice: support statistics")
Cc: stable@dpdk.org

Signed-off-by: Junyu Jiang <junyux.jiang@intel.com>
---
 drivers/net/ice/ice_ethdev.c | 36 ++++++++++++++++++++++++++++++++++++
 drivers/net/ice/ice_ethdev.h |  4 ++++
 2 files changed, 40 insertions(+)

diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index 3534d18ca..85aa6cfe6 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -4139,6 +4139,10 @@ ice_stat_update_40(struct ice_hw *hw,
 static void
 ice_update_vsi_stats(struct ice_vsi *vsi)
 {
+	uint64_t old_rx_bytes_h = vsi->old_rx_bytes & ~ICE_40_BIT_MASK;
+	uint64_t old_rx_bytes_l = vsi->old_rx_bytes & ICE_40_BIT_MASK;
+	uint64_t old_tx_bytes_h = vsi->old_tx_bytes & ~ICE_40_BIT_MASK;
+	uint64_t old_tx_bytes_l = vsi->old_tx_bytes & ICE_40_BIT_MASK;
 	struct ice_eth_stats *oes = &vsi->eth_stats_offset;
 	struct ice_eth_stats *nes = &vsi->eth_stats;
 	struct ice_hw *hw = ICE_VSI_TO_HW(vsi);
@@ -4156,6 +4160,13 @@ ice_update_vsi_stats(struct ice_vsi *vsi)
 	ice_stat_update_40(hw, GLV_BPRCH(idx), GLV_BPRCL(idx),
 			   vsi->offset_loaded, &oes->rx_broadcast,
 			   &nes->rx_broadcast);
+	/* enlarge the limitation when rx_bytes overflowed */
+	if (vsi->offset_loaded) {
+		if (old_rx_bytes_l > nes->rx_bytes)
+			old_rx_bytes_h += (uint64_t)1 << ICE_40_BIT_WIDTH;
+		nes->rx_bytes += old_rx_bytes_h;
+	}
+	vsi->old_rx_bytes = nes->rx_bytes;
 	/* exclude CRC bytes */
 	nes->rx_bytes -= (nes->rx_unicast + nes->rx_multicast +
 			  nes->rx_broadcast) * RTE_ETHER_CRC_LEN;
@@ -4182,6 +4193,13 @@ ice_update_vsi_stats(struct ice_vsi *vsi)
 	/* GLV_TDPC not supported */
 	ice_stat_update_32(hw, GLV_TEPC(idx), vsi->offset_loaded,
 			   &oes->tx_errors, &nes->tx_errors);
+	/* enlarge the limitation when tx_bytes overflowed */
+	if (vsi->offset_loaded) {
+		if (old_tx_bytes_l > nes->tx_bytes)
+			old_tx_bytes_h += (uint64_t)1 << ICE_40_BIT_WIDTH;
+		nes->tx_bytes += old_tx_bytes_h;
+	}
+	vsi->old_tx_bytes = nes->tx_bytes;
 	vsi->offset_loaded = true;
 
 	PMD_DRV_LOG(DEBUG, "************** VSI[%u] stats start **************",
@@ -4206,6 +4224,10 @@ ice_update_vsi_stats(struct ice_vsi *vsi)
 static void
 ice_read_stats_registers(struct ice_pf *pf, struct ice_hw *hw)
 {
+	uint64_t old_rx_bytes_h = pf->old_rx_bytes & ~ICE_40_BIT_MASK;
+	uint64_t old_rx_bytes_l = pf->old_rx_bytes & ICE_40_BIT_MASK;
+	uint64_t old_tx_bytes_h = pf->old_tx_bytes & ~ICE_40_BIT_MASK;
+	uint64_t old_tx_bytes_l = pf->old_tx_bytes & ICE_40_BIT_MASK;
 	struct ice_hw_port_stats *ns = &pf->stats; /* new stats */
 	struct ice_hw_port_stats *os = &pf->stats_offset; /* old stats */
 
@@ -4229,6 +4251,13 @@ ice_read_stats_registers(struct ice_pf *pf, struct ice_hw *hw)
 	ice_stat_update_32(hw, PRTRPB_RDPC,
 			   pf->offset_loaded, &os->eth.rx_discards,
 			   &ns->eth.rx_discards);
+	/* enlarge the limitation when rx_bytes overflowed */
+	if (pf->offset_loaded) {
+		if (old_rx_bytes_l > ns->eth.rx_bytes)
+			old_rx_bytes_h += (uint64_t)1 << ICE_40_BIT_WIDTH;
+		ns->eth.rx_bytes += old_rx_bytes_h;
+	}
+	pf->old_rx_bytes = ns->eth.rx_bytes;
 
 	/* Workaround: CRC size should not be included in byte statistics,
 	 * so subtract RTE_ETHER_CRC_LEN from the byte counter for each rx
@@ -4259,6 +4288,13 @@ ice_read_stats_registers(struct ice_pf *pf, struct ice_hw *hw)
 			   GLPRT_BPTCL(hw->port_info->lport),
 			   pf->offset_loaded, &os->eth.tx_broadcast,
 			   &ns->eth.tx_broadcast);
+	/* enlarge the limitation when tx_bytes overflowed */
+	if (pf->offset_loaded) {
+		if (old_tx_bytes_l > ns->eth.tx_bytes)
+			old_tx_bytes_h += (uint64_t)1 << ICE_40_BIT_WIDTH;
+		ns->eth.tx_bytes += old_tx_bytes_h;
+	}
+	pf->old_tx_bytes = ns->eth.tx_bytes;
 	ns->eth.tx_bytes -= (ns->eth.tx_unicast + ns->eth.tx_multicast +
 			     ns->eth.tx_broadcast) * RTE_ETHER_CRC_LEN;
 
diff --git a/drivers/net/ice/ice_ethdev.h b/drivers/net/ice/ice_ethdev.h
index 2bff735ca..69fd35b47 100644
--- a/drivers/net/ice/ice_ethdev.h
+++ b/drivers/net/ice/ice_ethdev.h
@@ -248,6 +248,8 @@ struct ice_vsi {
 	struct ice_eth_stats eth_stats_offset;
 	struct ice_eth_stats eth_stats;
 	bool offset_loaded;
+	uint64_t old_rx_bytes;
+	uint64_t old_tx_bytes;
 };
 
 enum proto_xtr_type {
@@ -391,6 +393,8 @@ struct ice_pf {
 	struct ice_parser_list perm_parser_list;
 	struct ice_parser_list dist_parser_list;
 	bool init_link_up;
+	uint64_t old_rx_bytes;
+	uint64_t old_tx_bytes;
 };
 
 #define ICE_MAX_QUEUE_NUM  2048
-- 
2.17.1


^ permalink raw reply related

* [PATCH net-next v3] bareudp: Reverted support to enable & disable rx metadata collection
From: Martin Varghese @ 2020-07-17  2:35 UTC (permalink / raw)
  To: netdev, davem, gnault; +Cc: Martin Varghese

From: Martin Varghese <martin.varghese@nokia.com>

The commit fe80536acf83 ("bareudp: Added attribute to enable & disable
rx metadata collection") breaks the the original(5.7) default behavior of
bareudp module to collect RX metadadata at the receive. It was added to
avoid the crash at the kernel neighbour subsytem when packet with metadata
from bareudp is processed. But it is no more needed as the
commit 394de110a733 ("net: Added pointer check for
dst->ops->neigh_lookup in dst_neigh_lookup_skb") solves this crash.

Fixes: fe80536acf83 ("bareudp: Added attribute to enable & disable rx metadata collection")
Signed-off-by: Martin Varghese <martin.varghese@nokia.com>
---
Changes in v2
    - Fixed Documentation.

Changes in v3
    - Removed rx_collect_metadata from bareudp_conf.

 Documentation/networking/bareudp.rst |  6 ++----
 drivers/net/bareudp.c                | 21 +++++----------------
 include/net/bareudp.h                |  1 -
 include/uapi/linux/if_link.h         |  1 -
 4 files changed, 7 insertions(+), 22 deletions(-)

diff --git a/Documentation/networking/bareudp.rst b/Documentation/networking/bareudp.rst
index 0e00636d8d74..465a8b251bfe 100644
--- a/Documentation/networking/bareudp.rst
+++ b/Documentation/networking/bareudp.rst
@@ -48,7 +48,5 @@ enabled.
 The bareudp device could be used along with OVS or flower filter in TC.
 The OVS or TC flower layer must set the tunnel information in SKB dst field before
 sending packet buffer to the bareudp device for transmission. On reception the
-bareudp device decapsulates the udp header and passes the inner packet to the
-network stack. If RX_COLLECT_METADATA flag is enabled in the device the tunnel
-information will be stored in the SKB dst field before the packet buffer is
-passed to the network stack.
+bareudp device extracts and stores the tunnel information in SKB dst field before
+passing the packet buffer to the network stack.
diff --git a/drivers/net/bareudp.c b/drivers/net/bareudp.c
index 108a8cafc4f8..44eb2b1d0416 100644
--- a/drivers/net/bareudp.c
+++ b/drivers/net/bareudp.c
@@ -46,7 +46,6 @@ struct bareudp_dev {
 	__be16             port;
 	u16	           sport_min;
 	bool               multi_proto_mode;
-	bool               rx_collect_metadata;
 	struct socket      __rcu *sock;
 	struct list_head   next;        /* bareudp node  on namespace list */
 	struct gro_cells   gro_cells;
@@ -126,14 +125,12 @@ static int bareudp_udp_encap_recv(struct sock *sk, struct sk_buff *skb)
 		bareudp->dev->stats.rx_dropped++;
 		goto drop;
 	}
-	if (bareudp->rx_collect_metadata) {
-		tun_dst = udp_tun_rx_dst(skb, family, TUNNEL_KEY, 0, 0);
-		if (!tun_dst) {
-			bareudp->dev->stats.rx_dropped++;
-			goto drop;
-		}
-		skb_dst_set(skb, &tun_dst->dst);
+	tun_dst = udp_tun_rx_dst(skb, family, TUNNEL_KEY, 0, 0);
+	if (!tun_dst) {
+		bareudp->dev->stats.rx_dropped++;
+		goto drop;
 	}
+	skb_dst_set(skb, &tun_dst->dst);
 	skb->dev = bareudp->dev;
 	oiph = skb_network_header(skb);
 	skb_reset_network_header(skb);
@@ -577,9 +574,6 @@ static int bareudp2info(struct nlattr *data[], struct bareudp_conf *conf,
 	if (data[IFLA_BAREUDP_MULTIPROTO_MODE])
 		conf->multi_proto_mode = true;
 
-	if (data[IFLA_BAREUDP_RX_COLLECT_METADATA])
-		conf->rx_collect_metadata = true;
-
 	return 0;
 }
 
@@ -617,7 +611,6 @@ static int bareudp_configure(struct net *net, struct net_device *dev,
 	bareudp->ethertype = conf->ethertype;
 	bareudp->sport_min = conf->sport_min;
 	bareudp->multi_proto_mode = conf->multi_proto_mode;
-	bareudp->rx_collect_metadata = conf->rx_collect_metadata;
 
 	err = register_netdevice(dev);
 	if (err)
@@ -676,7 +669,6 @@ static size_t bareudp_get_size(const struct net_device *dev)
 		nla_total_size(sizeof(__be16)) +  /* IFLA_BAREUDP_ETHERTYPE */
 		nla_total_size(sizeof(__u16))  +  /* IFLA_BAREUDP_SRCPORT_MIN */
 		nla_total_size(0)              +  /* IFLA_BAREUDP_MULTIPROTO_MODE */
-		nla_total_size(0)              +  /* IFLA_BAREUDP_RX_COLLECT_METADATA */
 		0;
 }
 
@@ -693,9 +685,6 @@ static int bareudp_fill_info(struct sk_buff *skb, const struct net_device *dev)
 	if (bareudp->multi_proto_mode &&
 	    nla_put_flag(skb, IFLA_BAREUDP_MULTIPROTO_MODE))
 		goto nla_put_failure;
-	if (bareudp->rx_collect_metadata &&
-	    nla_put_flag(skb, IFLA_BAREUDP_RX_COLLECT_METADATA))
-		goto nla_put_failure;
 
 	return 0;
 
diff --git a/include/net/bareudp.h b/include/net/bareudp.h
index 3dd5f9a8d01c..dc65a0d71d9b 100644
--- a/include/net/bareudp.h
+++ b/include/net/bareudp.h
@@ -12,7 +12,6 @@ struct bareudp_conf {
 	__be16 port;
 	u16 sport_min;
 	bool multi_proto_mode;
-	bool rx_collect_metadata;
 };
 
 struct net_device *bareudp_dev_create(struct net *net, const char *name,
diff --git a/include/uapi/linux/if_link.h b/include/uapi/linux/if_link.h
index cc185a007ade..a009365ad67b 100644
--- a/include/uapi/linux/if_link.h
+++ b/include/uapi/linux/if_link.h
@@ -600,7 +600,6 @@ enum {
 	IFLA_BAREUDP_ETHERTYPE,
 	IFLA_BAREUDP_SRCPORT_MIN,
 	IFLA_BAREUDP_MULTIPROTO_MODE,
-	IFLA_BAREUDP_RX_COLLECT_METADATA,
 	__IFLA_BAREUDP_MAX
 };
 
-- 
2.18.4


^ permalink raw reply related

* [PATCH v3 0/4] Split PCIe node to comply with hardware design
From: chuanjia.liu @ 2020-07-17  2:22 UTC (permalink / raw)
  To: Rob Herring, Lorenzo Pieralisi, linux-pci
  Cc: Ryder Lee, srv_heupstream, linux-kernel, jianjun.wang,
	Matthias Brugger, linux-mediatek, yong.wu, Bjorn Helgaas,
	linux-arm-kernel

There are two independent PCIe controllers in MT2712/MT7622 platform,
and each of them should contain an independent MSI domain.

In current architecture, MSI domain will be inherited from the root
bridge, and all of the devices will share the same MSI domain.
Hence that, the PCIe devices will not work properly if the irq number
which required is more than 32.

Split the PCIe node for MT2712/MT7622 platform to fix MSI issue and
comply with the hardware design.

change note:
  v3:rebase for 5.8-rc1. Only collect ack of Ryder, No code change.
  v2:change the allocation of mt2712 PCIe MMIO space due to the
     allocation size is not right in v1.

chuanjia.liu (4):
  dt-bindings: PCI: Mediatek: Update PCIe binding
  PCI: mediatek: Use regmap to get shared pcie-cfg base
  arm64: dts: mediatek: Split PCIe node for MT2712/MT7622
  ARM: dts: mediatek: Update mt7629 PCIe node

.../bindings/pci/mediatek-pcie-cfg.yaml       |  38 +++++
.../devicetree/bindings/pci/mediatek-pcie.txt | 144 +++++++++++-------
arch/arm/boot/dts/mt7629-rfb.dts              |   3 +-
arch/arm/boot/dts/mt7629.dtsi                 |  23 +--
arch/arm64/boot/dts/mediatek/mt2712e.dtsi     |  75 +++++----
.../dts/mediatek/mt7622-bananapi-bpi-r64.dts  |  16 +-
arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts  |   6 +-
arch/arm64/boot/dts/mediatek/mt7622.dtsi      |  68 ++++++---
drivers/pci/controller/pcie-mediatek.c        |  25 ++-
9 files changed, 258 insertions(+), 140 deletions(-)
create mode 100644 Documentation/devicetree/bindings/pci/mediatek-pcie-cfg.yaml

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

^ permalink raw reply

* [PATCH v3 4/4] ARM: dts: mediatek: Update mt7629 PCIe node
From: chuanjia.liu @ 2020-07-17  2:22 UTC (permalink / raw)
  To: Rob Herring, Lorenzo Pieralisi, linux-pci
  Cc: Ryder Lee, srv_heupstream, chuanjia.liu, linux-kernel,
	jianjun.wang, Matthias Brugger, linux-mediatek, yong.wu,
	Bjorn Helgaas, linux-arm-kernel
In-Reply-To: <20200717022223.1437-1-chuanjia.liu@mediatek.com>

From: "chuanjia.liu" <Chuanjia.Liu@mediatek.com>

Remove unused property and add pciecfg node.

Acked-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>
---
 arch/arm/boot/dts/mt7629-rfb.dts |  3 ++-
 arch/arm/boot/dts/mt7629.dtsi    | 23 +++++++++++++----------
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/arch/arm/boot/dts/mt7629-rfb.dts b/arch/arm/boot/dts/mt7629-rfb.dts
index 9980c10c6e29..eb536cbebd9b 100644
--- a/arch/arm/boot/dts/mt7629-rfb.dts
+++ b/arch/arm/boot/dts/mt7629-rfb.dts
@@ -140,9 +140,10 @@
 	};
 };
 
-&pcie {
+&pcie1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pcie_pins>;
+	status = "okay";
 };
 
 &pciephy1 {
diff --git a/arch/arm/boot/dts/mt7629.dtsi b/arch/arm/boot/dts/mt7629.dtsi
index 5cbb3d244c75..94567307b842 100644
--- a/arch/arm/boot/dts/mt7629.dtsi
+++ b/arch/arm/boot/dts/mt7629.dtsi
@@ -360,16 +360,21 @@
 			#reset-cells = <1>;
 		};
 
-		pcie: pcie@1a140000 {
+		pciecfg: pciecfg@1a140000 {
+			compatible = "mediatek,mt7629-pciecfg", "syscon";
+			reg = <0x1a140000 0x1000>;
+		};
+
+		pcie1: pcie@1a145000 {
 			compatible = "mediatek,mt7629-pcie";
 			device_type = "pci";
-			reg = <0x1a140000 0x1000>,
-			      <0x1a145000 0x1000>;
-			reg-names = "subsys","port1";
+			reg = <0x1a145000 0x1000>;
+			reg-names = "port1";
+			mediatek,pcie-cfg = <&pciecfg>;
 			#address-cells = <3>;
 			#size-cells = <2>;
-			interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_LOW>,
-				     <GIC_SPI 229 IRQ_TYPE_LEVEL_LOW>;
+			interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_LOW>;
+			interrupt-names = "pcie_irq";
 			clocks = <&pciesys CLK_PCIE_P1_MAC_EN>,
 				 <&pciesys CLK_PCIE_P0_AHB_EN>,
 				 <&pciesys CLK_PCIE_P1_AUX_EN>,
@@ -390,21 +395,19 @@
 			power-domains = <&scpsys MT7622_POWER_DOMAIN_HIF0>;
 			bus-range = <0x00 0xff>;
 			ranges = <0x82000000 0 0x20000000 0x20000000 0 0x10000000>;
+			status = "disabled";
 
-			pcie1: pcie@1,0 {
-				device_type = "pci";
+			slot1: pcie@1,0 {
 				reg = <0x0800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
 				#interrupt-cells = <1>;
 				ranges;
-				num-lanes = <1>;
 				interrupt-map-mask = <0 0 0 7>;
 				interrupt-map = <0 0 0 1 &pcie_intc1 0>,
 						<0 0 0 2 &pcie_intc1 1>,
 						<0 0 0 3 &pcie_intc1 2>,
 						<0 0 0 4 &pcie_intc1 3>;
-
 				pcie_intc1: interrupt-controller {
 					interrupt-controller;
 					#address-cells = <0>;
-- 
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related

* [PATCH v3 1/4] dt-bindings: PCI: Mediatek: Update PCIe binding
From: chuanjia.liu @ 2020-07-17  2:22 UTC (permalink / raw)
  To: Rob Herring, Lorenzo Pieralisi, linux-pci
  Cc: Ryder Lee, srv_heupstream, chuanjia.liu, linux-kernel,
	jianjun.wang, Matthias Brugger, linux-mediatek, yong.wu,
	Bjorn Helgaas, linux-arm-kernel
In-Reply-To: <20200717022223.1437-1-chuanjia.liu@mediatek.com>

From: "chuanjia.liu" <Chuanjia.Liu@mediatek.com>

There are two independent PCIe controllers in MT2712/MT7622 platform,
and each of them should contain an independent MSI domain.

In current architecture, MSI domain will be inherited from the root
bridge, and all of the devices will share the same MSI domain.
Hence that, the PCIe devices will not work properly if the irq number
which required is more than 32.

Split the PCIe node for MT2712/MT7622 platform to fix MSI issue and
comply with the hardware design.

Acked-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>
---
 .../bindings/pci/mediatek-pcie-cfg.yaml       |  38 +++++
 .../devicetree/bindings/pci/mediatek-pcie.txt | 144 +++++++++++-------
 2 files changed, 129 insertions(+), 53 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pci/mediatek-pcie-cfg.yaml

diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-cfg.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-cfg.yaml
new file mode 100644
index 000000000000..4d2835ab4858
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-cfg.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pci/mediatek-pcie-cfg.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek PCIECFG controller
+
+maintainers:
+  - Chuanjia Liu <chuanjia.liu@mediatek.com>
+  - Jianjun Wang <jianjun.wang@mediatek.com>
+
+description: |
+  The MediaTek PCIECFG controller controls some feature about
+  LTSSM, ASPM and so on.
+
+properties:
+  compatible:
+      items:
+        - enum:
+            - mediatek,mt7622-pciecfg
+            - mediatek,mt7629-pciecfg
+        - const: syscon
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    pciecfg: pciecfg@1a140000 {
+        compatible = "mediatek,mt7622-pciecfg", "syscon";
+        reg = <0 0x1a140000 0 0x1000>;
+    };
+...
diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie.txt b/Documentation/devicetree/bindings/pci/mediatek-pcie.txt
index 7468d666763a..31e261933685 100644
--- a/Documentation/devicetree/bindings/pci/mediatek-pcie.txt
+++ b/Documentation/devicetree/bindings/pci/mediatek-pcie.txt
@@ -8,7 +8,7 @@ Required properties:
 	"mediatek,mt7623-pcie"
 	"mediatek,mt7629-pcie"
 - device_type: Must be "pci"
-- reg: Base addresses and lengths of the PCIe subsys and root ports.
+- reg: Base addresses and lengths of the root ports.
 - reg-names: Names of the above areas to use during resource lookup.
 - #address-cells: Address representation for root ports (must be 3)
 - #size-cells: Size representation for root ports (must be 2)
@@ -19,10 +19,10 @@ Required properties:
    - sys_ckN :transaction layer and data link layer clock
   Required entries for MT2701/MT7623:
    - free_ck :for reference clock of PCIe subsys
-  Required entries for MT2712/MT7622:
+  Required entries for MT2712/MT7622/MT7629:
    - ahb_ckN :AHB slave interface operating clock for CSR access and RC
 	      initiated MMIO access
-  Required entries for MT7622:
+  Required entries for MT7622/MT7629:
    - axi_ckN :application layer MMIO channel operating clock
    - aux_ckN :pe2_mac_bridge and pe2_mac_core operating clock when
 	      pcie_mac_ck/pcie_pipe_ck is turned off
@@ -47,10 +47,13 @@ Required properties for MT7623/MT2701:
 - reset-names: Must be "pcie-rst0", "pcie-rst1", "pcie-rstN".. based on the
   number of root ports.
 
-Required properties for MT2712/MT7622:
+Required properties for MT2712/MT7622/MT7629:
 -interrupts: A list of interrupt outputs of the controller, must have one
 	     entry for each PCIe port
 
+Required properties for MT7622/MT7629:
+- mediatek,pcie-subsys: Should be a phandle of the pciecfg node.
+
 In addition, the device tree node must have sub-nodes describing each
 PCIe port interface, having the following mandatory properties:
 
@@ -143,56 +146,73 @@ Examples for MT7623:
 
 Examples for MT2712:
 
-	pcie: pcie@11700000 {
+	pcie1: pcie@112ff000 {
 		compatible = "mediatek,mt2712-pcie";
 		device_type = "pci";
-		reg = <0 0x11700000 0 0x1000>,
-		      <0 0x112ff000 0 0x1000>;
-		reg-names = "port0", "port1";
+		reg = <0 0x112ff000 0 0x1000>;
+		reg-names = "port1";
 		#address-cells = <3>;
 		#size-cells = <2>;
-		interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
-			     <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
-		clocks = <&topckgen CLK_TOP_PE2_MAC_P0_SEL>,
-			 <&topckgen CLK_TOP_PE2_MAC_P1_SEL>,
-			 <&pericfg CLK_PERI_PCIE0>,
+		interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "pcie_irq";
+		clocks = <&topckgen CLK_TOP_PE2_MAC_P1_SEL>,
 			 <&pericfg CLK_PERI_PCIE1>;
-		clock-names = "sys_ck0", "sys_ck1", "ahb_ck0", "ahb_ck1";
-		phys = <&pcie0_phy PHY_TYPE_PCIE>, <&pcie1_phy PHY_TYPE_PCIE>;
-		phy-names = "pcie-phy0", "pcie-phy1";
+		clock-names = "sys_ck1", "ahb_ck1";
+		phys = <&u3port1 PHY_TYPE_PCIE>;
+		phy-names = "pcie-phy1";
 		bus-range = <0x00 0xff>;
-		ranges = <0x82000000 0 0x20000000  0x0 0x20000000  0 0x10000000>;
+		ranges = <0x82000000 0 0x11400000  0x0 0x11400000  0 0x300000>;
+		status = "disabled";
 
-		pcie0: pcie@0,0 {
-			reg = <0x0000 0 0 0 0>;
+		slot1: pcie@1,0 {
+			reg = <0x0800 0 0 0 0>;
 			#address-cells = <3>;
 			#size-cells = <2>;
 			#interrupt-cells = <1>;
 			ranges;
 			interrupt-map-mask = <0 0 0 7>;
-			interrupt-map = <0 0 0 1 &pcie_intc0 0>,
-					<0 0 0 2 &pcie_intc0 1>,
-					<0 0 0 3 &pcie_intc0 2>,
-					<0 0 0 4 &pcie_intc0 3>;
-			pcie_intc0: interrupt-controller {
+			interrupt-map = <0 0 0 1 &pcie_intc1 0>,
+					<0 0 0 2 &pcie_intc1 1>,
+					<0 0 0 3 &pcie_intc1 2>,
+					<0 0 0 4 &pcie_intc1 3>;
+			pcie_intc1: interrupt-controller {
 				interrupt-controller;
 				#address-cells = <0>;
 				#interrupt-cells = <1>;
 			};
 		};
+	};
 
-		pcie1: pcie@1,0 {
-			reg = <0x0800 0 0 0 0>;
+	pcie0: pcie@11700000 {
+		compatible = "mediatek,mt2712-pcie";
+		device_type = "pci";
+		reg = <0 0x11700000 0 0x1000>;
+		reg-names = "port0";
+		#address-cells = <3>;
+		#size-cells = <2>;
+		interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "pcie_irq";
+		clocks = <&topckgen CLK_TOP_PE2_MAC_P0_SEL>,
+			 <&pericfg CLK_PERI_PCIE0>;
+		clock-names = "sys_ck0", "ahb_ck0";
+		phys = <&u3port0 PHY_TYPE_PCIE>;
+		phy-names = "pcie-phy0";
+		bus-range = <0x00 0xff>;
+		ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x10000000>;
+		status = "disabled";
+
+		slot0: pcie@0,0 {
+			reg = <0x0000 0 0 0 0>;
 			#address-cells = <3>;
 			#size-cells = <2>;
 			#interrupt-cells = <1>;
 			ranges;
 			interrupt-map-mask = <0 0 0 7>;
-			interrupt-map = <0 0 0 1 &pcie_intc1 0>,
-					<0 0 0 2 &pcie_intc1 1>,
-					<0 0 0 3 &pcie_intc1 2>,
-					<0 0 0 4 &pcie_intc1 3>;
-			pcie_intc1: interrupt-controller {
+			interrupt-map = <0 0 0 1 &pcie_intc0 0>,
+					<0 0 0 2 &pcie_intc0 1>,
+					<0 0 0 3 &pcie_intc0 2>,
+					<0 0 0 4 &pcie_intc0 3>;
+			pcie_intc0: interrupt-controller {
 				interrupt-controller;
 				#address-cells = <0>;
 				#interrupt-cells = <1>;
@@ -202,39 +222,31 @@ Examples for MT2712:
 
 Examples for MT7622:
 
-	pcie: pcie@1a140000 {
+	pcie0: pcie@1a143000 {
 		compatible = "mediatek,mt7622-pcie";
 		device_type = "pci";
-		reg = <0 0x1a140000 0 0x1000>,
-		      <0 0x1a143000 0 0x1000>,
-		      <0 0x1a145000 0 0x1000>;
-		reg-names = "subsys", "port0", "port1";
+		reg = <0 0x1a143000 0 0x1000>;
+		reg-names = "port0";
+		mediatek,pcie-cfg = <&pciecfg>;
 		#address-cells = <3>;
 		#size-cells = <2>;
-		interrupts = <GIC_SPI 228 IRQ_TYPE_LEVEL_LOW>,
-			     <GIC_SPI 229 IRQ_TYPE_LEVEL_LOW>;
+		interrupts = <GIC_SPI 228 IRQ_TYPE_LEVEL_LOW>;
+		interrupt-names = "pcie_irq";
 		clocks = <&pciesys CLK_PCIE_P0_MAC_EN>,
-			 <&pciesys CLK_PCIE_P1_MAC_EN>,
 			 <&pciesys CLK_PCIE_P0_AHB_EN>,
-			 <&pciesys CLK_PCIE_P1_AHB_EN>,
 			 <&pciesys CLK_PCIE_P0_AUX_EN>,
-			 <&pciesys CLK_PCIE_P1_AUX_EN>,
 			 <&pciesys CLK_PCIE_P0_AXI_EN>,
-			 <&pciesys CLK_PCIE_P1_AXI_EN>,
 			 <&pciesys CLK_PCIE_P0_OBFF_EN>,
-			 <&pciesys CLK_PCIE_P1_OBFF_EN>,
-			 <&pciesys CLK_PCIE_P0_PIPE_EN>,
-			 <&pciesys CLK_PCIE_P1_PIPE_EN>;
-		clock-names = "sys_ck0", "sys_ck1", "ahb_ck0", "ahb_ck1",
-			      "aux_ck0", "aux_ck1", "axi_ck0", "axi_ck1",
-			      "obff_ck0", "obff_ck1", "pipe_ck0", "pipe_ck1";
-		phys = <&pcie0_phy PHY_TYPE_PCIE>, <&pcie1_phy PHY_TYPE_PCIE>;
-		phy-names = "pcie-phy0", "pcie-phy1";
+			 <&pciesys CLK_PCIE_P0_PIPE_EN>;
+		clock-names = "sys_ck0", "ahb_ck0", "aux_ck0",
+			      "axi_ck0", "obff_ck0", "pipe_ck0";
+
 		power-domains = <&scpsys MT7622_POWER_DOMAIN_HIF0>;
 		bus-range = <0x00 0xff>;
-		ranges = <0x82000000 0 0x20000000  0x0 0x20000000  0 0x10000000>;
+		ranges = <0x82000000 0 0x20000000  0x0 0x20000000  0 0x8000000>;
+		status = "disabled";
 
-		pcie0: pcie@0,0 {
+		slot0: pcie@0,0 {
 			reg = <0x0000 0 0 0 0>;
 			#address-cells = <3>;
 			#size-cells = <2>;
@@ -251,8 +263,34 @@ Examples for MT7622:
 				#interrupt-cells = <1>;
 			};
 		};
+	};
+
+	pcie1: pcie@1a145000 {
+		compatible = "mediatek,mt7622-pcie";
+		device_type = "pci";
+		reg = <0 0x1a145000 0 0x1000>;
+		reg-names = "port1";
+		mediatek,pcie-cfg = <&pciecfg>;
+		#address-cells = <3>;
+		#size-cells = <2>;
+		interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_LOW>;
+		interrupt-names = "pcie_irq";
+		clocks = <&pciesys CLK_PCIE_P1_MAC_EN>,
+			 /* designer has connect RC1 with p0_ahb clock */
+			 <&pciesys CLK_PCIE_P0_AHB_EN>,
+			 <&pciesys CLK_PCIE_P1_AUX_EN>,
+			 <&pciesys CLK_PCIE_P1_AXI_EN>,
+			 <&pciesys CLK_PCIE_P1_OBFF_EN>,
+			 <&pciesys CLK_PCIE_P1_PIPE_EN>;
+		clock-names = "sys_ck1", "ahb_ck1", "aux_ck1",
+			      "axi_ck1", "obff_ck1", "pipe_ck1";
+
+		power-domains = <&scpsys MT7622_POWER_DOMAIN_HIF0>;
+		bus-range = <0x00 0xff>;
+		ranges = <0x82000000 0 0x28000000  0x0 0x28000000  0 0x8000000>;
+		status = "disabled";
 
-		pcie1: pcie@1,0 {
+		slot1: pcie@1,0 {
 			reg = <0x0800 0 0 0 0>;
 			#address-cells = <3>;
 			#size-cells = <2>;
-- 
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related

* [PATCH v3 0/4] Split PCIe node to comply with hardware design
From: chuanjia.liu @ 2020-07-17  2:22 UTC (permalink / raw)
  To: Rob Herring, Lorenzo Pieralisi, linux-pci
  Cc: Ryder Lee, srv_heupstream, linux-kernel, jianjun.wang,
	Matthias Brugger, linux-mediatek, yong.wu, Bjorn Helgaas,
	linux-arm-kernel

There are two independent PCIe controllers in MT2712/MT7622 platform,
and each of them should contain an independent MSI domain.

In current architecture, MSI domain will be inherited from the root
bridge, and all of the devices will share the same MSI domain.
Hence that, the PCIe devices will not work properly if the irq number
which required is more than 32.

Split the PCIe node for MT2712/MT7622 platform to fix MSI issue and
comply with the hardware design.

change note:
  v3:rebase for 5.8-rc1. Only collect ack of Ryder, No code change.
  v2:change the allocation of mt2712 PCIe MMIO space due to the
     allocation size is not right in v1.

chuanjia.liu (4):
  dt-bindings: PCI: Mediatek: Update PCIe binding
  PCI: mediatek: Use regmap to get shared pcie-cfg base
  arm64: dts: mediatek: Split PCIe node for MT2712/MT7622
  ARM: dts: mediatek: Update mt7629 PCIe node

.../bindings/pci/mediatek-pcie-cfg.yaml       |  38 +++++
.../devicetree/bindings/pci/mediatek-pcie.txt | 144 +++++++++++-------
arch/arm/boot/dts/mt7629-rfb.dts              |   3 +-
arch/arm/boot/dts/mt7629.dtsi                 |  23 +--
arch/arm64/boot/dts/mediatek/mt2712e.dtsi     |  75 +++++----
.../dts/mediatek/mt7622-bananapi-bpi-r64.dts  |  16 +-
arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts  |   6 +-
arch/arm64/boot/dts/mediatek/mt7622.dtsi      |  68 ++++++---
drivers/pci/controller/pcie-mediatek.c        |  25 ++-
9 files changed, 258 insertions(+), 140 deletions(-)
create mode 100644 Documentation/devicetree/bindings/pci/mediatek-pcie-cfg.yaml

-- 
2.25.1
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply

* [PATCH v3 4/4] ARM: dts: mediatek: Update mt7629 PCIe node
From: chuanjia.liu @ 2020-07-17  2:22 UTC (permalink / raw)
  To: Rob Herring, Lorenzo Pieralisi, linux-pci
  Cc: Ryder Lee, srv_heupstream, chuanjia.liu, linux-kernel,
	jianjun.wang, Matthias Brugger, linux-mediatek, yong.wu,
	Bjorn Helgaas, linux-arm-kernel
In-Reply-To: <20200717022223.1437-1-chuanjia.liu@mediatek.com>

From: "chuanjia.liu" <Chuanjia.Liu@mediatek.com>

Remove unused property and add pciecfg node.

Acked-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>
---
 arch/arm/boot/dts/mt7629-rfb.dts |  3 ++-
 arch/arm/boot/dts/mt7629.dtsi    | 23 +++++++++++++----------
 2 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/arch/arm/boot/dts/mt7629-rfb.dts b/arch/arm/boot/dts/mt7629-rfb.dts
index 9980c10c6e29..eb536cbebd9b 100644
--- a/arch/arm/boot/dts/mt7629-rfb.dts
+++ b/arch/arm/boot/dts/mt7629-rfb.dts
@@ -140,9 +140,10 @@
 	};
 };
 
-&pcie {
+&pcie1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&pcie_pins>;
+	status = "okay";
 };
 
 &pciephy1 {
diff --git a/arch/arm/boot/dts/mt7629.dtsi b/arch/arm/boot/dts/mt7629.dtsi
index 5cbb3d244c75..94567307b842 100644
--- a/arch/arm/boot/dts/mt7629.dtsi
+++ b/arch/arm/boot/dts/mt7629.dtsi
@@ -360,16 +360,21 @@
 			#reset-cells = <1>;
 		};
 
-		pcie: pcie@1a140000 {
+		pciecfg: pciecfg@1a140000 {
+			compatible = "mediatek,mt7629-pciecfg", "syscon";
+			reg = <0x1a140000 0x1000>;
+		};
+
+		pcie1: pcie@1a145000 {
 			compatible = "mediatek,mt7629-pcie";
 			device_type = "pci";
-			reg = <0x1a140000 0x1000>,
-			      <0x1a145000 0x1000>;
-			reg-names = "subsys","port1";
+			reg = <0x1a145000 0x1000>;
+			reg-names = "port1";
+			mediatek,pcie-cfg = <&pciecfg>;
 			#address-cells = <3>;
 			#size-cells = <2>;
-			interrupts = <GIC_SPI 176 IRQ_TYPE_LEVEL_LOW>,
-				     <GIC_SPI 229 IRQ_TYPE_LEVEL_LOW>;
+			interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_LOW>;
+			interrupt-names = "pcie_irq";
 			clocks = <&pciesys CLK_PCIE_P1_MAC_EN>,
 				 <&pciesys CLK_PCIE_P0_AHB_EN>,
 				 <&pciesys CLK_PCIE_P1_AUX_EN>,
@@ -390,21 +395,19 @@
 			power-domains = <&scpsys MT7622_POWER_DOMAIN_HIF0>;
 			bus-range = <0x00 0xff>;
 			ranges = <0x82000000 0 0x20000000 0x20000000 0 0x10000000>;
+			status = "disabled";
 
-			pcie1: pcie@1,0 {
-				device_type = "pci";
+			slot1: pcie@1,0 {
 				reg = <0x0800 0 0 0 0>;
 				#address-cells = <3>;
 				#size-cells = <2>;
 				#interrupt-cells = <1>;
 				ranges;
-				num-lanes = <1>;
 				interrupt-map-mask = <0 0 0 7>;
 				interrupt-map = <0 0 0 1 &pcie_intc1 0>,
 						<0 0 0 2 &pcie_intc1 1>,
 						<0 0 0 3 &pcie_intc1 2>,
 						<0 0 0 4 &pcie_intc1 3>;
-
 				pcie_intc1: interrupt-controller {
 					interrupt-controller;
 					#address-cells = <0>;
-- 
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related

* Re: [PATCH V4 3/3] nvme-pci: get rid of the division in the fast path
From: Chaitanya Kulkarni @ 2020-07-17  2:33 UTC (permalink / raw)
  To: Keith Busch; +Cc: hch@lst.de, linux-nvme@lists.infradead.org, sagi@grimberg.me
In-Reply-To: <20200717023242.GA322692@dhcp-10-100-145-180.wdl.wdc.com>

On 7/16/20 19:32, Keith Busch wrote:
>> +	const int last_prp = (NVME_CTRL_PAGE_SIZE >> ilog2(sizeof(__le64))) - 1;
> This is an integer constant expression, so the result is already
> evaluated at compile time.
> 

Okay, we can ignore this patch then.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply

* [PATCH v3 1/4] dt-bindings: PCI: Mediatek: Update PCIe binding
From: chuanjia.liu @ 2020-07-17  2:22 UTC (permalink / raw)
  To: Rob Herring, Lorenzo Pieralisi, linux-pci
  Cc: Ryder Lee, srv_heupstream, chuanjia.liu, linux-kernel,
	jianjun.wang, Matthias Brugger, linux-mediatek, yong.wu,
	Bjorn Helgaas, linux-arm-kernel
In-Reply-To: <20200717022223.1437-1-chuanjia.liu@mediatek.com>

From: "chuanjia.liu" <Chuanjia.Liu@mediatek.com>

There are two independent PCIe controllers in MT2712/MT7622 platform,
and each of them should contain an independent MSI domain.

In current architecture, MSI domain will be inherited from the root
bridge, and all of the devices will share the same MSI domain.
Hence that, the PCIe devices will not work properly if the irq number
which required is more than 32.

Split the PCIe node for MT2712/MT7622 platform to fix MSI issue and
comply with the hardware design.

Acked-by: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: chuanjia.liu <Chuanjia.Liu@mediatek.com>
---
 .../bindings/pci/mediatek-pcie-cfg.yaml       |  38 +++++
 .../devicetree/bindings/pci/mediatek-pcie.txt | 144 +++++++++++-------
 2 files changed, 129 insertions(+), 53 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/pci/mediatek-pcie-cfg.yaml

diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-cfg.yaml b/Documentation/devicetree/bindings/pci/mediatek-pcie-cfg.yaml
new file mode 100644
index 000000000000..4d2835ab4858
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-cfg.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pci/mediatek-pcie-cfg.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek PCIECFG controller
+
+maintainers:
+  - Chuanjia Liu <chuanjia.liu@mediatek.com>
+  - Jianjun Wang <jianjun.wang@mediatek.com>
+
+description: |
+  The MediaTek PCIECFG controller controls some feature about
+  LTSSM, ASPM and so on.
+
+properties:
+  compatible:
+      items:
+        - enum:
+            - mediatek,mt7622-pciecfg
+            - mediatek,mt7629-pciecfg
+        - const: syscon
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+
+examples:
+  - |
+    pciecfg: pciecfg@1a140000 {
+        compatible = "mediatek,mt7622-pciecfg", "syscon";
+        reg = <0 0x1a140000 0 0x1000>;
+    };
+...
diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie.txt b/Documentation/devicetree/bindings/pci/mediatek-pcie.txt
index 7468d666763a..31e261933685 100644
--- a/Documentation/devicetree/bindings/pci/mediatek-pcie.txt
+++ b/Documentation/devicetree/bindings/pci/mediatek-pcie.txt
@@ -8,7 +8,7 @@ Required properties:
 	"mediatek,mt7623-pcie"
 	"mediatek,mt7629-pcie"
 - device_type: Must be "pci"
-- reg: Base addresses and lengths of the PCIe subsys and root ports.
+- reg: Base addresses and lengths of the root ports.
 - reg-names: Names of the above areas to use during resource lookup.
 - #address-cells: Address representation for root ports (must be 3)
 - #size-cells: Size representation for root ports (must be 2)
@@ -19,10 +19,10 @@ Required properties:
    - sys_ckN :transaction layer and data link layer clock
   Required entries for MT2701/MT7623:
    - free_ck :for reference clock of PCIe subsys
-  Required entries for MT2712/MT7622:
+  Required entries for MT2712/MT7622/MT7629:
    - ahb_ckN :AHB slave interface operating clock for CSR access and RC
 	      initiated MMIO access
-  Required entries for MT7622:
+  Required entries for MT7622/MT7629:
    - axi_ckN :application layer MMIO channel operating clock
    - aux_ckN :pe2_mac_bridge and pe2_mac_core operating clock when
 	      pcie_mac_ck/pcie_pipe_ck is turned off
@@ -47,10 +47,13 @@ Required properties for MT7623/MT2701:
 - reset-names: Must be "pcie-rst0", "pcie-rst1", "pcie-rstN".. based on the
   number of root ports.
 
-Required properties for MT2712/MT7622:
+Required properties for MT2712/MT7622/MT7629:
 -interrupts: A list of interrupt outputs of the controller, must have one
 	     entry for each PCIe port
 
+Required properties for MT7622/MT7629:
+- mediatek,pcie-subsys: Should be a phandle of the pciecfg node.
+
 In addition, the device tree node must have sub-nodes describing each
 PCIe port interface, having the following mandatory properties:
 
@@ -143,56 +146,73 @@ Examples for MT7623:
 
 Examples for MT2712:
 
-	pcie: pcie@11700000 {
+	pcie1: pcie@112ff000 {
 		compatible = "mediatek,mt2712-pcie";
 		device_type = "pci";
-		reg = <0 0x11700000 0 0x1000>,
-		      <0 0x112ff000 0 0x1000>;
-		reg-names = "port0", "port1";
+		reg = <0 0x112ff000 0 0x1000>;
+		reg-names = "port1";
 		#address-cells = <3>;
 		#size-cells = <2>;
-		interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>,
-			     <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
-		clocks = <&topckgen CLK_TOP_PE2_MAC_P0_SEL>,
-			 <&topckgen CLK_TOP_PE2_MAC_P1_SEL>,
-			 <&pericfg CLK_PERI_PCIE0>,
+		interrupts = <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "pcie_irq";
+		clocks = <&topckgen CLK_TOP_PE2_MAC_P1_SEL>,
 			 <&pericfg CLK_PERI_PCIE1>;
-		clock-names = "sys_ck0", "sys_ck1", "ahb_ck0", "ahb_ck1";
-		phys = <&pcie0_phy PHY_TYPE_PCIE>, <&pcie1_phy PHY_TYPE_PCIE>;
-		phy-names = "pcie-phy0", "pcie-phy1";
+		clock-names = "sys_ck1", "ahb_ck1";
+		phys = <&u3port1 PHY_TYPE_PCIE>;
+		phy-names = "pcie-phy1";
 		bus-range = <0x00 0xff>;
-		ranges = <0x82000000 0 0x20000000  0x0 0x20000000  0 0x10000000>;
+		ranges = <0x82000000 0 0x11400000  0x0 0x11400000  0 0x300000>;
+		status = "disabled";
 
-		pcie0: pcie@0,0 {
-			reg = <0x0000 0 0 0 0>;
+		slot1: pcie@1,0 {
+			reg = <0x0800 0 0 0 0>;
 			#address-cells = <3>;
 			#size-cells = <2>;
 			#interrupt-cells = <1>;
 			ranges;
 			interrupt-map-mask = <0 0 0 7>;
-			interrupt-map = <0 0 0 1 &pcie_intc0 0>,
-					<0 0 0 2 &pcie_intc0 1>,
-					<0 0 0 3 &pcie_intc0 2>,
-					<0 0 0 4 &pcie_intc0 3>;
-			pcie_intc0: interrupt-controller {
+			interrupt-map = <0 0 0 1 &pcie_intc1 0>,
+					<0 0 0 2 &pcie_intc1 1>,
+					<0 0 0 3 &pcie_intc1 2>,
+					<0 0 0 4 &pcie_intc1 3>;
+			pcie_intc1: interrupt-controller {
 				interrupt-controller;
 				#address-cells = <0>;
 				#interrupt-cells = <1>;
 			};
 		};
+	};
 
-		pcie1: pcie@1,0 {
-			reg = <0x0800 0 0 0 0>;
+	pcie0: pcie@11700000 {
+		compatible = "mediatek,mt2712-pcie";
+		device_type = "pci";
+		reg = <0 0x11700000 0 0x1000>;
+		reg-names = "port0";
+		#address-cells = <3>;
+		#size-cells = <2>;
+		interrupts = <GIC_SPI 115 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "pcie_irq";
+		clocks = <&topckgen CLK_TOP_PE2_MAC_P0_SEL>,
+			 <&pericfg CLK_PERI_PCIE0>;
+		clock-names = "sys_ck0", "ahb_ck0";
+		phys = <&u3port0 PHY_TYPE_PCIE>;
+		phy-names = "pcie-phy0";
+		bus-range = <0x00 0xff>;
+		ranges = <0x82000000 0 0x20000000 0x0 0x20000000 0 0x10000000>;
+		status = "disabled";
+
+		slot0: pcie@0,0 {
+			reg = <0x0000 0 0 0 0>;
 			#address-cells = <3>;
 			#size-cells = <2>;
 			#interrupt-cells = <1>;
 			ranges;
 			interrupt-map-mask = <0 0 0 7>;
-			interrupt-map = <0 0 0 1 &pcie_intc1 0>,
-					<0 0 0 2 &pcie_intc1 1>,
-					<0 0 0 3 &pcie_intc1 2>,
-					<0 0 0 4 &pcie_intc1 3>;
-			pcie_intc1: interrupt-controller {
+			interrupt-map = <0 0 0 1 &pcie_intc0 0>,
+					<0 0 0 2 &pcie_intc0 1>,
+					<0 0 0 3 &pcie_intc0 2>,
+					<0 0 0 4 &pcie_intc0 3>;
+			pcie_intc0: interrupt-controller {
 				interrupt-controller;
 				#address-cells = <0>;
 				#interrupt-cells = <1>;
@@ -202,39 +222,31 @@ Examples for MT2712:
 
 Examples for MT7622:
 
-	pcie: pcie@1a140000 {
+	pcie0: pcie@1a143000 {
 		compatible = "mediatek,mt7622-pcie";
 		device_type = "pci";
-		reg = <0 0x1a140000 0 0x1000>,
-		      <0 0x1a143000 0 0x1000>,
-		      <0 0x1a145000 0 0x1000>;
-		reg-names = "subsys", "port0", "port1";
+		reg = <0 0x1a143000 0 0x1000>;
+		reg-names = "port0";
+		mediatek,pcie-cfg = <&pciecfg>;
 		#address-cells = <3>;
 		#size-cells = <2>;
-		interrupts = <GIC_SPI 228 IRQ_TYPE_LEVEL_LOW>,
-			     <GIC_SPI 229 IRQ_TYPE_LEVEL_LOW>;
+		interrupts = <GIC_SPI 228 IRQ_TYPE_LEVEL_LOW>;
+		interrupt-names = "pcie_irq";
 		clocks = <&pciesys CLK_PCIE_P0_MAC_EN>,
-			 <&pciesys CLK_PCIE_P1_MAC_EN>,
 			 <&pciesys CLK_PCIE_P0_AHB_EN>,
-			 <&pciesys CLK_PCIE_P1_AHB_EN>,
 			 <&pciesys CLK_PCIE_P0_AUX_EN>,
-			 <&pciesys CLK_PCIE_P1_AUX_EN>,
 			 <&pciesys CLK_PCIE_P0_AXI_EN>,
-			 <&pciesys CLK_PCIE_P1_AXI_EN>,
 			 <&pciesys CLK_PCIE_P0_OBFF_EN>,
-			 <&pciesys CLK_PCIE_P1_OBFF_EN>,
-			 <&pciesys CLK_PCIE_P0_PIPE_EN>,
-			 <&pciesys CLK_PCIE_P1_PIPE_EN>;
-		clock-names = "sys_ck0", "sys_ck1", "ahb_ck0", "ahb_ck1",
-			      "aux_ck0", "aux_ck1", "axi_ck0", "axi_ck1",
-			      "obff_ck0", "obff_ck1", "pipe_ck0", "pipe_ck1";
-		phys = <&pcie0_phy PHY_TYPE_PCIE>, <&pcie1_phy PHY_TYPE_PCIE>;
-		phy-names = "pcie-phy0", "pcie-phy1";
+			 <&pciesys CLK_PCIE_P0_PIPE_EN>;
+		clock-names = "sys_ck0", "ahb_ck0", "aux_ck0",
+			      "axi_ck0", "obff_ck0", "pipe_ck0";
+
 		power-domains = <&scpsys MT7622_POWER_DOMAIN_HIF0>;
 		bus-range = <0x00 0xff>;
-		ranges = <0x82000000 0 0x20000000  0x0 0x20000000  0 0x10000000>;
+		ranges = <0x82000000 0 0x20000000  0x0 0x20000000  0 0x8000000>;
+		status = "disabled";
 
-		pcie0: pcie@0,0 {
+		slot0: pcie@0,0 {
 			reg = <0x0000 0 0 0 0>;
 			#address-cells = <3>;
 			#size-cells = <2>;
@@ -251,8 +263,34 @@ Examples for MT7622:
 				#interrupt-cells = <1>;
 			};
 		};
+	};
+
+	pcie1: pcie@1a145000 {
+		compatible = "mediatek,mt7622-pcie";
+		device_type = "pci";
+		reg = <0 0x1a145000 0 0x1000>;
+		reg-names = "port1";
+		mediatek,pcie-cfg = <&pciecfg>;
+		#address-cells = <3>;
+		#size-cells = <2>;
+		interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_LOW>;
+		interrupt-names = "pcie_irq";
+		clocks = <&pciesys CLK_PCIE_P1_MAC_EN>,
+			 /* designer has connect RC1 with p0_ahb clock */
+			 <&pciesys CLK_PCIE_P0_AHB_EN>,
+			 <&pciesys CLK_PCIE_P1_AUX_EN>,
+			 <&pciesys CLK_PCIE_P1_AXI_EN>,
+			 <&pciesys CLK_PCIE_P1_OBFF_EN>,
+			 <&pciesys CLK_PCIE_P1_PIPE_EN>;
+		clock-names = "sys_ck1", "ahb_ck1", "aux_ck1",
+			      "axi_ck1", "obff_ck1", "pipe_ck1";
+
+		power-domains = <&scpsys MT7622_POWER_DOMAIN_HIF0>;
+		bus-range = <0x00 0xff>;
+		ranges = <0x82000000 0 0x28000000  0x0 0x28000000  0 0x8000000>;
+		status = "disabled";
 
-		pcie1: pcie@1,0 {
+		slot1: pcie@1,0 {
 			reg = <0x0800 0 0 0 0>;
 			#address-cells = <3>;
 			#size-cells = <2>;
-- 
2.18.0
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related

* Re: [PATCH V4 3/3] nvme-pci: get rid of the division in the fast path
From: Keith Busch @ 2020-07-17  2:32 UTC (permalink / raw)
  To: Chaitanya Kulkarni; +Cc: hch, linux-nvme, sagi
In-Reply-To: <20200717005139.18923-4-chaitanya.kulkarni@wdc.com>

On Thu, Jul 16, 2020 at 05:51:39PM -0700, Chaitanya Kulkarni wrote:
> Since we have a macro for calculating the size of the ctrl page we can
> remove the division in the fast path for nvme-pci in nvme_unmap_data().
> 
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
> ---
>  drivers/nvme/host/pci.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index 3c852a8f18ed..616db1ae137c 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -513,7 +513,8 @@ static inline bool nvme_pci_use_sgls(struct nvme_dev *dev, struct request *req)
>  static void nvme_unmap_data(struct nvme_dev *dev, struct request *req)
>  {
>  	struct nvme_iod *iod = blk_mq_rq_to_pdu(req);
> -	const int last_prp = NVME_CTRL_PAGE_SIZE / sizeof(__le64) - 1;
> +	const int last_prp = (NVME_CTRL_PAGE_SIZE >> ilog2(sizeof(__le64))) - 1;

This is an integer constant expression, so the result is already
evaluated at compile time.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

^ permalink raw reply

* Re: [GIT PULL FOR v5.9] Convert Renesas DT bindings to YAML (#20200717021308)
From: Jenkins @ 2020-07-17  2:33 UTC (permalink / raw)
  To: mchehab+samsung, linux-media; +Cc: builder
In-Reply-To: <20200717021308.GA359@pendragon.ideasonboard.com>

From: builder@linuxtv.org

Pull request: https://patchwork.linuxtv.org/project/linux-media/patch/20200717021308.GA359@pendragon.ideasonboard.com/
Build log: https://builder.linuxtv.org/job/patchwork/60047/
Build time: 00:13:32
Link: https://lore.kernel.org/linux-media/20200717021308.GA359@pendragon.ideasonboard.com

gpg: Signature made Fri 17 Jul 2020 02:10:58 AM UTC
gpg:                using RSA key BD94648A8E47ECEDBF199B1862255D299E280B24
gpg:                issuer "laurent.pinchart@ideasonboard.com"
gpg: Good signature from "Laurent Pinchart <laurent.pinchart@ideasonboard.com>" [full]

Summary: 4 patches and/or PDF generation with issues, being 0 at build time

Error/warnings:


Error #256 when running cat patches/0001-dt-bindings-media-renesas-fcp-Convert-binding-to-YAM.patch | formail -c | ./scripts/checkpatch.pl --terse --mailback --no-summary --strict:
$ cat patches/0001-dt-bindings-media-renesas-fcp-Convert-binding-to-YAM.patch | formail -c | ./scripts/checkpatch.pl --terse --mailback --no-summary --strict
-:27: WARNING: DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.rst
-:63: WARNING: DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.rst

Error #256 when running cat patches/0004-dt-bindings-media-renesas-fdp1-Convert-binding-to-YA.patch | formail -c | ./scripts/checkpatch.pl --terse --mailback --no-summary --strict:
$ cat patches/0004-dt-bindings-media-renesas-fdp1-Convert-binding-to-YA.patch | formail -c | ./scripts/checkpatch.pl --terse --mailback --no-summary --strict
-:27: WARNING: DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.rst
-:66: WARNING: DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.rst

Error #256 when running cat patches/0007-dt-bindings-media-renesas-vsp1-Convert-binding-to-YA.patch | formail -c | ./scripts/checkpatch.pl --terse --mailback --no-summary --strict:
$ cat patches/0007-dt-bindings-media-renesas-vsp1-Convert-binding-to-YA.patch | formail -c | ./scripts/checkpatch.pl --terse --mailback --no-summary --strict
-:27: WARNING: DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.rst
-:59: WARNING: DT binding docs and includes should be a separate patch. See: Documentation/devicetree/bindings/submitting-patches.rst


^ permalink raw reply

* Re: [PATCH v2 1/3] dt-bindings: usb: ci-hdrc-usb2: add property disable-runtime-pm
From: Peter Chen @ 2020-07-17  2:31 UTC (permalink / raw)
  To: Rob Herring
  Cc: Philippe Schenker, devicetree@vger.kernel.org,
	linux-usb@vger.kernel.org, Shawn Guo, Greg Kroah-Hartman,
	linux-kernel@vger.kernel.org
In-Reply-To: <20200716192452.GA2699629@bogus>

On 20-07-16 13:24:52, Rob Herring wrote:
> On Tue, Jul 14, 2020 at 05:18:20PM +0200, Philippe Schenker wrote:
> > Chipidea depends on some hardware signals to be there in order
> > for runtime-pm to work well. Add the possibility to disable runtime
> > power management that is necessary for certain boards.
> 
> This is why we have SoC specific compatible strings. Use that.

It is a board design limitation, not SoC's. To support USB low power
mode for device mode, either VBUS connects to SoC, or VBUS connect to
GPIO, or VBUS connect to Type-C IC, but none of the design is used
at that board. So the USB can't enter low power mode for that board,
otherwise, the USB controller can't be woken up since no any interrupts
will occur if USB cable (host at other side) connects to the connector.

Peter
> 
> > 
> > Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
> > ---
> > 
> > Changes in v2: None
> > 
> >  Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
> > index 51376cbe5f3d..67a31df13e69 100644
> > --- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
> > +++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.txt
> > @@ -90,6 +90,7 @@ Optional properties:
> >    case, the "idle" state needs to pull down the data and strobe pin
> >    and the "active" state needs to pull up the strobe pin.
> >  - pinctrl-n: alternate pin modes
> > +- disable-runtime-pm: This disables the runtime power management.
> 
> This is a Linux feature, not h/w description or config.
> 
> >  
> >  i.mx specific properties
> >  - fsl,usbmisc: phandler of non-core register device, with one
> > -- 
> > 2.27.0
> > 

-- 

Thanks,
Peter Chen

^ permalink raw reply

* Re: [PATCH v4 5/7] drivers: thermal: tsens: add interrupt support for 9860 driver
From: kernel test robot @ 2020-07-17  2:24 UTC (permalink / raw)
  To: Ansuel Smith, Rob Herring
  Cc: kbuild-all, clang-built-linux, Ansuel Smith, Amit Kucheria,
	Andy Gross, Bjorn Andersson, Zhang Rui, Daniel Lezcano,
	Michael Turquette, Stephen Boyd, linux-pm
In-Reply-To: <20200716022817.30439-6-ansuelsmth@gmail.com>

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

Hi Ansuel,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on robh/for-next]
[also build test WARNING on clk/clk-next linus/master v5.8-rc5 next-20200716]
[cannot apply to thermal/next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Ansuel-Smith/Add-support-for-ipq8064-tsens/20200716-103106
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm64-randconfig-r004-20200716 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # install arm64 cross compiling tool for clang build
        # apt-get install binutils-aarch64-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/thermal/qcom/tsens-8960.c:216:14: warning: signed shift result (0x9B0000000) requires 37 bits to represent, but 'int' only has 32 bits [-Wshift-overflow]
                             (CONFIG << CONFIG_SHIFT_8660);
                              ~~~~~~ ^  ~~~~~~~~~~~~~~~~~
   1 warning generated.

vim +/int +216 drivers/thermal/qcom/tsens-8960.c

   191	
   192	static void hw_init(struct tsens_priv *priv)
   193	{
   194		int ret;
   195		unsigned int reg_cntl = 0, reg_cfg = 0, reg_thr = 0;
   196		unsigned int reg_status_cntl = 0;
   197	
   198		regmap_read(priv->tm_map, CNTL_ADDR, &reg_cntl);
   199		regmap_write(priv->tm_map, CNTL_ADDR, reg_cntl | TSENS_SW_RST);
   200	
   201		reg_cntl |= SLP_CLK_ENA | (MEASURE_PERIOD << 18) |
   202			    (((1 << priv->num_sensors) - 1) << SENSOR0_SHIFT);
   203		regmap_write(priv->tm_map, CNTL_ADDR, reg_cntl);
   204		regmap_read(priv->tm_map, STATUS_CNTL_ADDR_8064, &reg_status_cntl);
   205		reg_status_cntl |= LOWER_STATUS_CLR | UPPER_STATUS_CLR |
   206				   MIN_STATUS_MASK | MAX_STATUS_MASK;
   207		regmap_write(priv->tm_map, STATUS_CNTL_ADDR_8064, reg_status_cntl);
   208		reg_cntl |= TSENS_EN;
   209		regmap_write(priv->tm_map, CNTL_ADDR, reg_cntl);
   210	
   211		regmap_read(priv->tm_map, CONFIG_ADDR, &reg_cfg);
   212		if (priv->num_sensors > 1)
   213			reg_cfg = (reg_cfg & ~CONFIG_MASK) | CONFIG;
   214		else
   215			reg_cfg = (reg_cfg & ~CONFIG_MASK) |
 > 216				  (CONFIG << CONFIG_SHIFT_8660);
   217		regmap_write(priv->tm_map, CONFIG_ADDR, reg_cfg);
   218	
   219		reg_thr |= (LOWER_LIMIT_TH_8064 << THRESHOLD_LOWER_LIMIT_SHIFT) |
   220			   (UPPER_LIMIT_TH_8064 << THRESHOLD_UPPER_LIMIT_SHIFT) |
   221			   (MIN_LIMIT_TH << THRESHOLD_MIN_LIMIT_SHIFT) |
   222			   (MAX_LIMIT_TH << THRESHOLD_MAX_LIMIT_SHIFT);
   223	
   224		regmap_write(priv->tm_map, THRESHOLD_ADDR, reg_thr);
   225	
   226		ret = devm_request_irq(priv->dev, priv->tsens_irq, tsens_isr,
   227				       IRQF_TRIGGER_RISING, "tsens_interrupt", priv);
   228		if (ret < 0) {
   229			dev_err(priv->dev, "request_irq FAIL: %d", ret);
   230			return;
   231		}
   232	
   233		INIT_WORK(&priv->tsens_work, tsens_scheduler_fn);
   234	}
   235	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 38708 bytes --]

^ permalink raw reply

* Re: Speaker pops with max98357a on rk3399-gru-kevin since v5.7
From: Tzung-Bi Shih @ 2020-07-17  2:27 UTC (permalink / raw)
  To: Alper Nebi Yasak
  Cc: ALSA development, Heiko Stuebner, Linux Kernel Mailing List,
	Takashi Iwai, Liam Girdwood, linux-rockchip, Mark Brown
In-Reply-To: <f2ca985f-7dbd-847a-1875-dd0e1044ef02@gmail.com>

On Thu, Jul 16, 2020 at 7:49 PM Alper Nebi Yasak
<alpernebiyasak@gmail.com> wrote:
> I have been getting "pop" sounds from the speaker on my rk3399-gru-kevin
> for a while, and bisected it to 128f825aeab7 ("ASoC: max98357a: move
> control of SD_MODE to DAPM"), but looks like the pops were somewhat
> expected:

I am not convinced the pop comes from 128f825aeab7.

> As of v5.8-rc5 I'm still getting the speaker pops. More info below, but
> not all pops coincide with "set sdmode" messages, and vice versa.
> Reverting that commit stops the pops, but then the "Speakers Switch" can
> no longer mute the speakers.

(I don't have a rk3399-gru-kevin so I got another test machine with MAX98357A.)
(I was testing with and without an audio server.)
Observations:
- I can hear the pop either with or without 128f825aeab7 (with and
without sdmode-delay).
- The pop noise is not always.  Higher probability after stopping
playback than before starting.
- As you also mentioned, the pop noise is not directly related to
SD_MODE transition.

^ permalink raw reply

* Re: Speaker pops with max98357a on rk3399-gru-kevin since v5.7
From: Tzung-Bi Shih @ 2020-07-17  2:27 UTC (permalink / raw)
  To: Alper Nebi Yasak
  Cc: Mark Brown, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
	Heiko Stuebner, ALSA development, Linux Kernel Mailing List,
	linux-rockchip
In-Reply-To: <f2ca985f-7dbd-847a-1875-dd0e1044ef02@gmail.com>

On Thu, Jul 16, 2020 at 7:49 PM Alper Nebi Yasak
<alpernebiyasak@gmail.com> wrote:
> I have been getting "pop" sounds from the speaker on my rk3399-gru-kevin
> for a while, and bisected it to 128f825aeab7 ("ASoC: max98357a: move
> control of SD_MODE to DAPM"), but looks like the pops were somewhat
> expected:

I am not convinced the pop comes from 128f825aeab7.

> As of v5.8-rc5 I'm still getting the speaker pops. More info below, but
> not all pops coincide with "set sdmode" messages, and vice versa.
> Reverting that commit stops the pops, but then the "Speakers Switch" can
> no longer mute the speakers.

(I don't have a rk3399-gru-kevin so I got another test machine with MAX98357A.)
(I was testing with and without an audio server.)
Observations:
- I can hear the pop either with or without 128f825aeab7 (with and
without sdmode-delay).
- The pop noise is not always.  Higher probability after stopping
playback than before starting.
- As you also mentioned, the pop noise is not directly related to
SD_MODE transition.

^ permalink raw reply

* Re: [PATCH 2/3] drm: uapi: Use SPDX in DRM drivers uAPI headers
From: Laurent Pinchart @ 2020-07-17  2:27 UTC (permalink / raw)
  To: Christian König
  Cc: Sean Paul, Thomas Hellstrom, Laurent Pinchart, Greg Kroah-Hartman,
	dri-devel, Thierry Reding, VMware Graphics, Ben Skeggs,
	Alex Deucher, Thomas Gleixner, Gerd Hoffmann
In-Reply-To: <20200622092933.GY20149@phenom.ffwll.local>

Hi Christian,

On Mon, Jun 22, 2020 at 11:29:33AM +0200, Daniel Vetter wrote:
> On Mon, Jun 22, 2020 at 09:58:44AM +0200, Christian König wrote:
> > Am 21.06.20 um 04:07 schrieb Laurent Pinchart:
> > > Most of the DRM drivers uAPI headers are licensed under the MIT license,
> > > and carry copies of the license with slight variations. Replace them
> > > with SPDX headers.
> > 
> > My personal opinion is that this is a really good idea, but my professional
> > is that we need the acknowledgment from our legal department for this.
> 
> I think official ack from amd on first patch, especially the .rst snippet,
> would be really good indeed.

Any update on this one ?

> > Please separate that change into one for each driver/company/maintainer.
> > Amdgpu, radeon, r128 can be one for example.

I'll do so.

> You can leave all the other legacy drivers in one patch (mga, savage, sis,
> via), since there's likely no one around anymore and will just boil down
> to drm maintainer ack from Dave&me.
>
> > > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> > > ---
> > >   include/uapi/drm/amdgpu_drm.h  | 19 +------------------
> > >   include/uapi/drm/i915_drm.h    | 22 +---------------------
> > >   include/uapi/drm/mga_drm.h     | 20 +-------------------
> > >   include/uapi/drm/msm_drm.h     | 20 +-------------------
> > >   include/uapi/drm/nouveau_drm.h | 20 +-------------------
> > >   include/uapi/drm/qxl_drm.h     | 20 +-------------------
> > >   include/uapi/drm/r128_drm.h    | 20 +-------------------
> > >   include/uapi/drm/radeon_drm.h  | 20 +-------------------
> > >   include/uapi/drm/savage_drm.h  | 20 +-------------------
> > >   include/uapi/drm/sis_drm.h     | 21 +--------------------
> > >   include/uapi/drm/tegra_drm.h   | 19 +------------------
> > >   include/uapi/drm/v3d_drm.h     | 20 +-------------------
> > >   include/uapi/drm/vc4_drm.h     | 20 +-------------------
> > >   include/uapi/drm/vgem_drm.h    | 22 +---------------------
> > >   include/uapi/drm/via_drm.h     | 20 +-------------------
> > >   include/uapi/drm/virtgpu_drm.h | 20 +-------------------
> > >   include/uapi/drm/vmwgfx_drm.h  | 21 +--------------------
> > >   17 files changed, 17 insertions(+), 327 deletions(-)
> > > 
> > > diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
> > > index 4e873dcbe68f..c6adda72bec7 100644
> > > --- a/include/uapi/drm/amdgpu_drm.h
> > > +++ b/include/uapi/drm/amdgpu_drm.h
> > > @@ -1,3 +1,4 @@
> > > +/* SPDX-License-Identifier: MIT */
> > >   /* amdgpu_drm.h -- Public header for the amdgpu driver -*- linux-c -*-
> > >    *
> > >    * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas.
> > > @@ -5,24 +6,6 @@
> > >    * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
> > >    * Copyright 2014 Advanced Micro Devices, Inc.
> > >    *
> > > - * Permission is hereby granted, free of charge, to any person obtaining a
> > > - * copy of this software and associated documentation files (the "Software"),
> > > - * to deal in the Software without restriction, including without limitation
> > > - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> > > - * and/or sell copies of the Software, and to permit persons to whom the
> > > - * Software is furnished to do so, subject to the following conditions:
> > > - *
> > > - * The above copyright notice and this permission notice shall be included in
> > > - * all copies or substantial portions of the Software.
> > > - *
> > > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> > > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > > - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> > > - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
> > > - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> > > - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> > > - * OTHER DEALINGS IN THE SOFTWARE.
> > > - *
> > >    * Authors:
> > >    *    Kevin E. Martin <martin@valinux.com>
> > >    *    Gareth Hughes <gareth@valinux.com>
> > > diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
> > > index 14b67cd6b54b..c29e3acb3026 100644
> > > --- a/include/uapi/drm/i915_drm.h
> > > +++ b/include/uapi/drm/i915_drm.h
> > > @@ -1,27 +1,7 @@
> > > +/* SPDX-License-Identifier: MIT */
> > >   /*
> > >    * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
> > >    * All Rights Reserved.
> > > - *
> > > - * Permission is hereby granted, free of charge, to any person obtaining a
> > > - * copy of this software and associated documentation files (the
> > > - * "Software"), to deal in the Software without restriction, including
> > > - * without limitation the rights to use, copy, modify, merge, publish,
> > > - * distribute, sub license, and/or sell copies of the Software, and to
> > > - * permit persons to whom the Software is furnished to do so, subject to
> > > - * the following conditions:
> > > - *
> > > - * The above copyright notice and this permission notice (including the
> > > - * next paragraph) shall be included in all copies or substantial portions
> > > - * of the Software.
> > > - *
> > > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
> > > - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> > > - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
> > > - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
> > > - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> > > - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
> > > - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
> > > - *
> > >    */
> > >   #ifndef _UAPI_I915_DRM_H_
> > > diff --git a/include/uapi/drm/mga_drm.h b/include/uapi/drm/mga_drm.h
> > > index 8c4337548ab5..4415efefe0cf 100644
> > > --- a/include/uapi/drm/mga_drm.h
> > > +++ b/include/uapi/drm/mga_drm.h
> > > @@ -1,3 +1,4 @@
> > > +/* SPDX-License-Identifier: MIT */
> > >   /* mga_drm.h -- Public header for the Matrox g200/g400 driver -*- linux-c -*-
> > >    * Created: Tue Jan 25 01:50:01 1999 by jhartmann@precisioninsight.com
> > >    *
> > > @@ -5,25 +6,6 @@
> > >    * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
> > >    * All rights reserved.
> > >    *
> > > - * Permission is hereby granted, free of charge, to any person obtaining a
> > > - * copy of this software and associated documentation files (the "Software"),
> > > - * to deal in the Software without restriction, including without limitation
> > > - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> > > - * and/or sell copies of the Software, and to permit persons to whom the
> > > - * Software is furnished to do so, subject to the following conditions:
> > > - *
> > > - * The above copyright notice and this permission notice (including the next
> > > - * paragraph) shall be included in all copies or substantial portions of the
> > > - * Software.
> > > - *
> > > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> > > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > > - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> > > - * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> > > - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> > > - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> > > - * OTHER DEALINGS IN THE SOFTWARE.
> > > - *
> > >    * Authors:
> > >    *    Jeff Hartmann <jhartmann@valinux.com>
> > >    *    Keith Whitwell <keith@tungstengraphics.com>
> > > diff --git a/include/uapi/drm/msm_drm.h b/include/uapi/drm/msm_drm.h
> > > index 0b85ed6a3710..189d1a7f7a7b 100644
> > > --- a/include/uapi/drm/msm_drm.h
> > > +++ b/include/uapi/drm/msm_drm.h
> > > @@ -1,25 +1,7 @@
> > > +/* SPDX-License-Identifier: MIT */
> > >   /*
> > >    * Copyright (C) 2013 Red Hat
> > >    * Author: Rob Clark <robdclark@gmail.com>
> > > - *
> > > - * Permission is hereby granted, free of charge, to any person obtaining a
> > > - * copy of this software and associated documentation files (the "Software"),
> > > - * to deal in the Software without restriction, including without limitation
> > > - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> > > - * and/or sell copies of the Software, and to permit persons to whom the
> > > - * Software is furnished to do so, subject to the following conditions:
> > > - *
> > > - * The above copyright notice and this permission notice (including the next
> > > - * paragraph) shall be included in all copies or substantial portions of the
> > > - * Software.
> > > - *
> > > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> > > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > > - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> > > - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> > > - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> > > - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> > > - * SOFTWARE.
> > >    */
> > >   #ifndef __MSM_DRM_H__
> > > diff --git a/include/uapi/drm/nouveau_drm.h b/include/uapi/drm/nouveau_drm.h
> > > index 853a327433d3..555283b49080 100644
> > > --- a/include/uapi/drm/nouveau_drm.h
> > > +++ b/include/uapi/drm/nouveau_drm.h
> > > @@ -1,25 +1,7 @@
> > > +/* SPDX-License-Identifier: MIT */
> > >   /*
> > >    * Copyright 2005 Stephane Marchesin.
> > >    * All Rights Reserved.
> > > - *
> > > - * Permission is hereby granted, free of charge, to any person obtaining a
> > > - * copy of this software and associated documentation files (the "Software"),
> > > - * to deal in the Software without restriction, including without limitation
> > > - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> > > - * and/or sell copies of the Software, and to permit persons to whom the
> > > - * Software is furnished to do so, subject to the following conditions:
> > > - *
> > > - * The above copyright notice and this permission notice (including the next
> > > - * paragraph) shall be included in all copies or substantial portions of the
> > > - * Software.
> > > - *
> > > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> > > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > > - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> > > - * VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> > > - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> > > - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> > > - * OTHER DEALINGS IN THE SOFTWARE.
> > >    */
> > >   #ifndef __NOUVEAU_DRM_H__
> > > diff --git a/include/uapi/drm/qxl_drm.h b/include/uapi/drm/qxl_drm.h
> > > index 880999d2d863..9fbf97ad7272 100644
> > > --- a/include/uapi/drm/qxl_drm.h
> > > +++ b/include/uapi/drm/qxl_drm.h
> > > @@ -1,25 +1,7 @@
> > > +/* SPDX-License-Identifier: MIT */
> > >   /*
> > >    * Copyright 2013 Red Hat
> > >    * All Rights Reserved.
> > > - *
> > > - * Permission is hereby granted, free of charge, to any person obtaining a
> > > - * copy of this software and associated documentation files (the "Software"),
> > > - * to deal in the Software without restriction, including without limitation
> > > - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> > > - * and/or sell copies of the Software, and to permit persons to whom the
> > > - * Software is furnished to do so, subject to the following conditions:
> > > - *
> > > - * The above copyright notice and this permission notice (including the next
> > > - * paragraph) shall be included in all copies or substantial portions of the
> > > - * Software.
> > > - *
> > > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> > > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > > - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> > > - * THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> > > - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> > > - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> > > - * OTHER DEALINGS IN THE SOFTWARE.
> > >    */
> > >   #ifndef QXL_DRM_H
> > >   #define QXL_DRM_H
> > > diff --git a/include/uapi/drm/r128_drm.h b/include/uapi/drm/r128_drm.h
> > > index 690e9c62f510..c426e6a1c843 100644
> > > --- a/include/uapi/drm/r128_drm.h
> > > +++ b/include/uapi/drm/r128_drm.h
> > > @@ -1,3 +1,4 @@
> > > +/* SPDX-License-Identifier: MIT */
> > >   /* r128_drm.h -- Public header for the r128 driver -*- linux-c -*-
> > >    * Created: Wed Apr  5 19:24:19 2000 by kevin@precisioninsight.com
> > >    */
> > > @@ -6,25 +7,6 @@
> > >    * Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
> > >    * All rights reserved.
> > >    *
> > > - * Permission is hereby granted, free of charge, to any person obtaining a
> > > - * copy of this software and associated documentation files (the "Software"),
> > > - * to deal in the Software without restriction, including without limitation
> > > - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> > > - * and/or sell copies of the Software, and to permit persons to whom the
> > > - * Software is furnished to do so, subject to the following conditions:
> > > - *
> > > - * The above copyright notice and this permission notice (including the next
> > > - * paragraph) shall be included in all copies or substantial portions of the
> > > - * Software.
> > > - *
> > > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> > > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > > - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> > > - * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> > > - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> > > - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> > > - * DEALINGS IN THE SOFTWARE.
> > > - *
> > >    * Authors:
> > >    *    Gareth Hughes <gareth@valinux.com>
> > >    *    Kevin E. Martin <martin@valinux.com>
> > > diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h
> > > index 490a59cc4532..b5c4ef813a9e 100644
> > > --- a/include/uapi/drm/radeon_drm.h
> > > +++ b/include/uapi/drm/radeon_drm.h
> > > @@ -1,3 +1,4 @@
> > > +/* SPDX-License-Identifier: MIT */
> > >   /* radeon_drm.h -- Public header for the radeon driver -*- linux-c -*-
> > >    *
> > >    * Copyright 2000 Precision Insight, Inc., Cedar Park, Texas.
> > > @@ -5,25 +6,6 @@
> > >    * Copyright 2002 Tungsten Graphics, Inc., Cedar Park, Texas.
> > >    * All rights reserved.
> > >    *
> > > - * Permission is hereby granted, free of charge, to any person obtaining a
> > > - * copy of this software and associated documentation files (the "Software"),
> > > - * to deal in the Software without restriction, including without limitation
> > > - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> > > - * and/or sell copies of the Software, and to permit persons to whom the
> > > - * Software is furnished to do so, subject to the following conditions:
> > > - *
> > > - * The above copyright notice and this permission notice (including the next
> > > - * paragraph) shall be included in all copies or substantial portions of the
> > > - * Software.
> > > - *
> > > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> > > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > > - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> > > - * PRECISION INSIGHT AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> > > - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> > > - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> > > - * DEALINGS IN THE SOFTWARE.
> > > - *
> > >    * Authors:
> > >    *    Kevin E. Martin <martin@valinux.com>
> > >    *    Gareth Hughes <gareth@valinux.com>
> > > diff --git a/include/uapi/drm/savage_drm.h b/include/uapi/drm/savage_drm.h
> > > index 0f6eddef74aa..bd5e74348db4 100644
> > > --- a/include/uapi/drm/savage_drm.h
> > > +++ b/include/uapi/drm/savage_drm.h
> > > @@ -1,26 +1,8 @@
> > > +/* SPDX-License-Identifier: MIT */
> > >   /* savage_drm.h -- Public header for the savage driver
> > >    *
> > >    * Copyright 2004  Felix Kuehling
> > >    * All Rights Reserved.
> > > - *
> > > - * Permission is hereby granted, free of charge, to any person obtaining a
> > > - * copy of this software and associated documentation files (the "Software"),
> > > - * to deal in the Software without restriction, including without limitation
> > > - * the rights to use, copy, modify, merge, publish, distribute, sub license,
> > > - * and/or sell copies of the Software, and to permit persons to whom the
> > > - * Software is furnished to do so, subject to the following conditions:
> > > - *
> > > - * The above copyright notice and this permission notice (including the
> > > - * next paragraph) shall be included in all copies or substantial portions
> > > - * of the Software.
> > > - *
> > > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> > > - * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> > > - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> > > - * NON-INFRINGEMENT. IN NO EVENT SHALL FELIX KUEHLING BE LIABLE FOR
> > > - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
> > > - * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
> > > - * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
> > >    */
> > >   #ifndef __SAVAGE_DRM_H__
> > > diff --git a/include/uapi/drm/sis_drm.h b/include/uapi/drm/sis_drm.h
> > > index 3e3f7e989e0b..9f7eb13b1975 100644
> > > --- a/include/uapi/drm/sis_drm.h
> > > +++ b/include/uapi/drm/sis_drm.h
> > > @@ -1,27 +1,8 @@
> > > +/* SPDX-License-Identifier: MIT */
> > >   /* sis_drv.h -- Private header for sis driver -*- linux-c -*- */
> > >   /*
> > >    * Copyright 2005 Eric Anholt
> > >    * All Rights Reserved.
> > > - *
> > > - * Permission is hereby granted, free of charge, to any person obtaining a
> > > - * copy of this software and associated documentation files (the "Software"),
> > > - * to deal in the Software without restriction, including without limitation
> > > - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> > > - * and/or sell copies of the Software, and to permit persons to whom the
> > > - * Software is furnished to do so, subject to the following conditions:
> > > - *
> > > - * The above copyright notice and this permission notice (including the next
> > > - * paragraph) shall be included in all copies or substantial portions of the
> > > - * Software.
> > > - *
> > > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> > > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > > - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> > > - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> > > - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> > > - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> > > - * SOFTWARE.
> > > - *
> > >    */
> > >   #ifndef __SIS_DRM_H__
> > > diff --git a/include/uapi/drm/tegra_drm.h b/include/uapi/drm/tegra_drm.h
> > > index c4df3c3668b3..98c2f17aa7de 100644
> > > --- a/include/uapi/drm/tegra_drm.h
> > > +++ b/include/uapi/drm/tegra_drm.h
> > > @@ -1,23 +1,6 @@
> > > +/* SPDX-License-Identifier: MIT */
> > >   /*
> > >    * Copyright (c) 2012-2013, NVIDIA CORPORATION.  All rights reserved.
> > > - *
> > > - * Permission is hereby granted, free of charge, to any person obtaining a
> > > - * copy of this software and associated documentation files (the "Software"),
> > > - * to deal in the Software without restriction, including without limitation
> > > - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> > > - * and/or sell copies of the Software, and to permit persons to whom the
> > > - * Software is furnished to do so, subject to the following conditions:
> > > - *
> > > - * The above copyright notice and this permission notice shall be included in
> > > - * all copies or substantial portions of the Software.
> > > - *
> > > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> > > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > > - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> > > - * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
> > > - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> > > - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> > > - * OTHER DEALINGS IN THE SOFTWARE.
> > >    */
> > >   #ifndef _UAPI_TEGRA_DRM_H_
> > > diff --git a/include/uapi/drm/v3d_drm.h b/include/uapi/drm/v3d_drm.h
> > > index 1ce746e228d9..7895fb9bc018 100644
> > > --- a/include/uapi/drm/v3d_drm.h
> > > +++ b/include/uapi/drm/v3d_drm.h
> > > @@ -1,24 +1,6 @@
> > > +/* SPDX-License-Identifier: MIT */
> > >   /*
> > >    * Copyright © 2014-2018 Broadcom
> > > - *
> > > - * Permission is hereby granted, free of charge, to any person obtaining a
> > > - * copy of this software and associated documentation files (the "Software"),
> > > - * to deal in the Software without restriction, including without limitation
> > > - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> > > - * and/or sell copies of the Software, and to permit persons to whom the
> > > - * Software is furnished to do so, subject to the following conditions:
> > > - *
> > > - * The above copyright notice and this permission notice (including the next
> > > - * paragraph) shall be included in all copies or substantial portions of the
> > > - * Software.
> > > - *
> > > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> > > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > > - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> > > - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> > > - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> > > - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> > > - * IN THE SOFTWARE.
> > >    */
> > >   #ifndef _V3D_DRM_H_
> > > diff --git a/include/uapi/drm/vc4_drm.h b/include/uapi/drm/vc4_drm.h
> > > index 2cac6277a1d7..14b9a2186eae 100644
> > > --- a/include/uapi/drm/vc4_drm.h
> > > +++ b/include/uapi/drm/vc4_drm.h
> > > @@ -1,24 +1,6 @@
> > > +/* SPDX-License-Identifier: MIT */
> > >   /*
> > >    * Copyright © 2014-2015 Broadcom
> > > - *
> > > - * Permission is hereby granted, free of charge, to any person obtaining a
> > > - * copy of this software and associated documentation files (the "Software"),
> > > - * to deal in the Software without restriction, including without limitation
> > > - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> > > - * and/or sell copies of the Software, and to permit persons to whom the
> > > - * Software is furnished to do so, subject to the following conditions:
> > > - *
> > > - * The above copyright notice and this permission notice (including the next
> > > - * paragraph) shall be included in all copies or substantial portions of the
> > > - * Software.
> > > - *
> > > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> > > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > > - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> > > - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> > > - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> > > - * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
> > > - * IN THE SOFTWARE.
> > >    */
> > >   #ifndef _UAPI_VC4_DRM_H_
> > > diff --git a/include/uapi/drm/vgem_drm.h b/include/uapi/drm/vgem_drm.h
> > > index bf66f5db6da8..965e1ad00dcb 100644
> > > --- a/include/uapi/drm/vgem_drm.h
> > > +++ b/include/uapi/drm/vgem_drm.h
> > > @@ -1,27 +1,7 @@
> > > +/* SPDX-License-Identifier: MIT */
> > >   /*
> > >    * Copyright 2016 Intel Corporation
> > >    * All Rights Reserved.
> > > - *
> > > - * Permission is hereby granted, free of charge, to any person obtaining a
> > > - * copy of this software and associated documentation files (the
> > > - * "Software"), to deal in the Software without restriction, including
> > > - * without limitation the rights to use, copy, modify, merge, publish,
> > > - * distribute, sub license, and/or sell copies of the Software, and to
> > > - * permit persons to whom the Software is furnished to do so, subject to
> > > - * the following conditions:
> > > - *
> > > - * The above copyright notice and this permission notice (including the
> > > - * next paragraph) shall be included in all copies or substantial portions
> > > - * of the Software.
> > > - *
> > > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
> > > - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> > > - * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
> > > - * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
> > > - * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
> > > - * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
> > > - * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
> > > - *
> > >    */
> > >   #ifndef _UAPI_VGEM_DRM_H_
> > > diff --git a/include/uapi/drm/via_drm.h b/include/uapi/drm/via_drm.h
> > > index a1e125d42208..d77a21e7eb70 100644
> > > --- a/include/uapi/drm/via_drm.h
> > > +++ b/include/uapi/drm/via_drm.h
> > > @@ -1,25 +1,7 @@
> > > +/* SPDX-License-Identifier: MIT */
> > >   /*
> > >    * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
> > >    * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved.
> > > - *
> > > - * Permission is hereby granted, free of charge, to any person obtaining a
> > > - * copy of this software and associated documentation files (the "Software"),
> > > - * to deal in the Software without restriction, including without limitation
> > > - * the rights to use, copy, modify, merge, publish, distribute, sub license,
> > > - * and/or sell copies of the Software, and to permit persons to whom the
> > > - * Software is furnished to do so, subject to the following conditions:
> > > - *
> > > - * The above copyright notice and this permission notice (including the
> > > - * next paragraph) shall be included in all copies or substantial portions
> > > - * of the Software.
> > > - *
> > > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> > > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > > - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
> > > - * VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> > > - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> > > - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
> > > - * DEALINGS IN THE SOFTWARE.
> > >    */
> > >   #ifndef _VIA_DRM_H_
> > >   #define _VIA_DRM_H_
> > > diff --git a/include/uapi/drm/virtgpu_drm.h b/include/uapi/drm/virtgpu_drm.h
> > > index f06a789f34cd..cea0352bc319 100644
> > > --- a/include/uapi/drm/virtgpu_drm.h
> > > +++ b/include/uapi/drm/virtgpu_drm.h
> > > @@ -1,25 +1,7 @@
> > > +/* SPDX-License-Identifier: MIT */
> > >   /*
> > >    * Copyright 2013 Red Hat
> > >    * All Rights Reserved.
> > > - *
> > > - * Permission is hereby granted, free of charge, to any person obtaining a
> > > - * copy of this software and associated documentation files (the "Software"),
> > > - * to deal in the Software without restriction, including without limitation
> > > - * the rights to use, copy, modify, merge, publish, distribute, sublicense,
> > > - * and/or sell copies of the Software, and to permit persons to whom the
> > > - * Software is furnished to do so, subject to the following conditions:
> > > - *
> > > - * The above copyright notice and this permission notice (including the next
> > > - * paragraph) shall be included in all copies or substantial portions of the
> > > - * Software.
> > > - *
> > > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> > > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > > - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
> > > - * THE AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
> > > - * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
> > > - * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> > > - * OTHER DEALINGS IN THE SOFTWARE.
> > >    */
> > >   #ifndef VIRTGPU_DRM_H
> > >   #define VIRTGPU_DRM_H
> > > diff --git a/include/uapi/drm/vmwgfx_drm.h b/include/uapi/drm/vmwgfx_drm.h
> > > index 02e917507479..728e432f09a1 100644
> > > --- a/include/uapi/drm/vmwgfx_drm.h
> > > +++ b/include/uapi/drm/vmwgfx_drm.h
> > > @@ -1,28 +1,9 @@
> > > +/* SPDX-License-Identifier: MIT */
> > >   /**************************************************************************
> > >    *
> > >    * Copyright © 2009-2015 VMware, Inc., Palo Alto, CA., USA
> > >    * All Rights Reserved.
> > >    *
> > > - * Permission is hereby granted, free of charge, to any person obtaining a
> > > - * copy of this software and associated documentation files (the
> > > - * "Software"), to deal in the Software without restriction, including
> > > - * without limitation the rights to use, copy, modify, merge, publish,
> > > - * distribute, sub license, and/or sell copies of the Software, and to
> > > - * permit persons to whom the Software is furnished to do so, subject to
> > > - * the following conditions:
> > > - *
> > > - * The above copyright notice and this permission notice (including the
> > > - * next paragraph) shall be included in all copies or substantial portions
> > > - * of the Software.
> > > - *
> > > - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> > > - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> > > - * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
> > > - * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,
> > > - * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
> > > - * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
> > > - * USE OR OTHER DEALINGS IN THE SOFTWARE.
> > > - *
> > >    **************************************************************************/
> > >   #ifndef __VMWGFX_DRM_H__

-- 
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply


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.