1. We don't known how many memory needed by type reserved. It's good to
   take no care about it.
2. Remove unused macro definition and name of type reserved.

Signed-off-by: Zhen Lei <[email protected]>
---
 drivers/irqchip/irq-gic-v3-its.c   | 19 +++++++++++--------
 include/linux/irqchip/arm-gic-v3.h |  4 ----
 2 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index bbf9504..d649910 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -777,11 +777,7 @@ static int __init its_alloc_lpi_tables(void)
 static const char *its_base_type_string[] = {
        [GITS_BASER_TYPE_DEVICE]        = "Devices",
        [GITS_BASER_TYPE_VCPU]          = "Virtual CPUs",
-       [GITS_BASER_TYPE_RESERVED3]     = "Reserved (3)",
        [GITS_BASER_TYPE_COLLECTION]    = "Interrupt Collections",
-       [GITS_BASER_TYPE_RESERVED5]     = "Reserved (5)",
-       [GITS_BASER_TYPE_RESERVED6]     = "Reserved (6)",
-       [GITS_BASER_TYPE_RESERVED7]     = "Reserved (7)",
 };

 static void its_free_tables(struct its_node *its)
@@ -814,9 +810,6 @@ static int its_alloc_tables(struct its_node *its)
                void *base;

                switch (type) {
-               case GITS_BASER_TYPE_NONE:
-                       continue;
-
                /*
                 * Allocate as many entries as required to fit the
                 * range of device IDs that the ITS can grok... The ID
@@ -833,9 +826,19 @@ static int its_alloc_tables(struct its_node *its)
                        break;
                        }

-               default:
+               case GITS_BASER_TYPE_VCPU:
+               case GITS_BASER_TYPE_COLLECTION:
                        alloc_size = PAGE_SIZE;
                        break;
+
+               /*
+                * Here treat type Reserved as 0x0(NONE). If type reserved need
+                * memory, it should be allocated by BIOS/UEFI, OS take no care
+                * about it.
+                */
+               case GITS_BASER_TYPE_NONE:
+               default:
+                       continue;
                }

                psz = PAGE_SIZE;
diff --git a/include/linux/irqchip/arm-gic-v3.h 
b/include/linux/irqchip/arm-gic-v3.h
index 67f5779..212df88 100644
--- a/include/linux/irqchip/arm-gic-v3.h
+++ b/include/linux/irqchip/arm-gic-v3.h
@@ -233,11 +233,7 @@
 #define GITS_BASER_TYPE_NONE           0
 #define GITS_BASER_TYPE_DEVICE         1
 #define GITS_BASER_TYPE_VCPU           2
-#define GITS_BASER_TYPE_RESERVED3      3
 #define GITS_BASER_TYPE_COLLECTION     4
-#define GITS_BASER_TYPE_RESERVED5      5
-#define GITS_BASER_TYPE_RESERVED6      6
-#define GITS_BASER_TYPE_RESERVED7      7

 /*
  * ITS commands
--
1.8.0


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to