imamnurby/smpl_train_seed8 huggingface dataset:
--- initial
+++ final
@@ -1,43 +1,43 @@
 static void __init mcpcia_startup_hose(struct pci_controller *hose) {
   int mid = MCPCIA_HOSE2MID(hose->index);
   unsigned int tmp;
   mcpcia_pci_clr_err(mid);
   /*
    * Set up error reporting.
    */
   tmp = *(vuip)MCPCIA_CAP_ERR(mid);
   tmp |= 0x0006; /* master/target abort */
   *(vuip)MCPCIA_CAP_ERR(mid) = tmp;
   mb();
   tmp = *(vuip)MCPCIA_CAP_ERR(mid);
   /*
    * Set up the PCI->physical memory translation windows.
    *
    * Window 0 is scatter-gather 8MB at 8MB (for isa)
    * Window 1 is scatter-gather (up to) 1GB at 1GB (for pci)
    * Window 2 is direct access 2GB at 2GB
    */
-  hose->sg_isa = iommu_arena_new(hose, 0x00800000, 0x00800000, 0);
-  hose->sg_pci = iommu_arena_new(hose, 0x40000000, size_for_memory(0x40000000), 0);
+  hose->sg_isa = iommu_arena_new(hose, 0x00800000, 0x00800000, SMP_CACHE_BYTES);
+  hose->sg_pci = iommu_arena_new(hose, 0x40000000, size_for_memory(0x40000000), SMP_CACHE_BYTES);
   __direct_map_base = 0x80000000;
   __direct_map_size = 0x80000000;
   *(vuip)MCPCIA_W0_BASE(mid) = hose->sg_isa->dma_base | 3;
   *(vuip)MCPCIA_W0_MASK(mid) = (hose->sg_isa->size - 1) & 0xfff00000;
   *(vuip)MCPCIA_T0_BASE(mid) = virt_to_phys(hose->sg_isa->ptes) >> 8;
   *(vuip)MCPCIA_W1_BASE(mid) = hose->sg_pci->dma_base | 3;
   *(vuip)MCPCIA_W1_MASK(mid) = (hose->sg_pci->size - 1) & 0xfff00000;
   *(vuip)MCPCIA_T1_BASE(mid) = virt_to_phys(hose->sg_pci->ptes) >> 8;
   *(vuip)MCPCIA_W2_BASE(mid) = __direct_map_base | 1;
   *(vuip)MCPCIA_W2_MASK(mid) = (__direct_map_size - 1) & 0xfff00000;
   *(vuip)MCPCIA_T2_BASE(mid) = 0;
   *(vuip)MCPCIA_W3_BASE(mid) = 0x0;
   mcpcia_pci_tbi(hose, 0, -1);
   *(vuip)MCPCIA_HBASE(mid) = 0x0;
   mb();
   *(vuip)MCPCIA_HAE_MEM(mid) = 0U;
   mb();
   *(vuip)MCPCIA_HAE_MEM(mid); /* read it back. */
   *(vuip)MCPCIA_HAE_IO(mid) = 0;
   mb();
   *(vuip)MCPCIA_HAE_IO(mid); /* read it back. */
 }<sep>@@
expression hose, base, length;
@@

-	iommu_arena_new(hose, base, length, 0)
+	iommu_arena_new(hose, base, length, SMP_CACHE_BYTES)
--- initial
+++ final
@@ -1,17 +1,17 @@
 static void __init t2_sg_map_window2(struct pci_controller *hose, unsigned long base, unsigned long length) {
   unsigned long temp;
   /* Note we can only do 1 SG window, as the other is for direct, so
      do an ISA SG area, especially for the floppy. */
-  hose->sg_isa = iommu_arena_new(hose, base, length, 0);
+  hose->sg_isa = iommu_arena_new(hose, base, length, SMP_CACHE_BYTES);
   hose->sg_pci = NULL;
   temp = (base & 0xfff00000UL) | ((base + length - 1) >> 20);
   *(vulp)T2_WBASE2 = temp | 0xc0000UL; /* OR in ENABLE/SG bits */
   temp = (length - 1) & 0xfff00000UL;
   *(vulp)T2_WMASK2 = temp;
   *(vulp)T2_TBASE2 = virt_to_phys(hose->sg_isa->ptes) >> 1;
   mb();
   t2_pci_tbi(hose, 0, -1); /* flush TLB all */
 #if DEBUG_PRINT_FINAL_SETTINGS
   printk("%s: setting WBASE2=0x%lx WMASK2=0x%lx TBASE2=0x%lx\n", __func__, *(vulp)T2_WBASE2, *(vulp)T2_WMASK2, *(vulp)T2_TBASE2);
 #endif
 }<sep>@@
expression hose, base, length;
@@

-	iommu_arena_new(hose, base, length, 0)
+	iommu_arena_new(hose, base, length, SMP_CACHE_BYTES)
--- initial
+++ final
@@ -1,55 +1,55 @@
 void __init wildfire_init_hose(int qbbno, int hoseno) {
   struct pci_controller *hose;
   wildfire_pci *pci;
   hose = alloc_pci_controller();
   hose->io_space = alloc_resource();
   hose->mem_space = alloc_resource();
   /* This is for userland consumption. */
   hose->sparse_mem_base = 0;
   hose->sparse_io_base = 0;
   hose->dense_mem_base = WILDFIRE_MEM(qbbno, hoseno);
   hose->dense_io_base = WILDFIRE_IO(qbbno, hoseno);
   hose->config_space_base = WILDFIRE_CONF(qbbno, hoseno);
   hose->index = (qbbno << 3) + hoseno;
   hose->io_space->start = WILDFIRE_IO(qbbno, hoseno) - WILDFIRE_IO_BIAS;
   hose->io_space->end = hose->io_space->start + WILDFIRE_IO_SPACE - 1;
   hose->io_space->name = pci_io_names[hoseno];
   hose->io_space->flags = IORESOURCE_IO;
   hose->mem_space->start = WILDFIRE_MEM(qbbno, hoseno) - WILDFIRE_MEM_BIAS;
   hose->mem_space->end = hose->mem_space->start + 0xffffffff;
   hose->mem_space->name = pci_mem_names[hoseno];
   hose->mem_space->flags = IORESOURCE_MEM;
   if (request_resource(&ioport_resource, hose->io_space) < 0) printk(KERN_ERR "Failed to request IO on qbb %d hose %d\n", qbbno, hoseno);
   if (request_resource(&iomem_resource, hose->mem_space) < 0) printk(KERN_ERR "Failed to request MEM on qbb %d hose %d\n", qbbno, hoseno);
 #if DEBUG_DUMP_REGS
   wildfire_dump_pci_regs(qbbno, hoseno);
 #endif
   /*
    * Set up the PCI to main memory translation windows.
    *
    * Note: Window 3 is scatter-gather only
    *
    * Window 0 is scatter-gather 8MB at 8MB (for isa)
    * Window 1 is direct access 1GB at 1GB
    * Window 2 is direct access 1GB at 2GB
    * Window 3 is scatter-gather 128MB at 3GB
    * ??? We ought to scale window 3 memory.
    *
    */
-  hose->sg_isa = iommu_arena_new(hose, 0x00800000, 0x00800000, 0);
-  hose->sg_pci = iommu_arena_new(hose, 0xc0000000, 0x08000000, 0);
+  hose->sg_isa = iommu_arena_new(hose, 0x00800000, 0x00800000, SMP_CACHE_BYTES);
+  hose->sg_pci = iommu_arena_new(hose, 0xc0000000, 0x08000000, SMP_CACHE_BYTES);
   pci = WILDFIRE_pci(qbbno, hoseno);
   pci->pci_window[0].wbase.csr = hose->sg_isa->dma_base | 3;
   pci->pci_window[0].wmask.csr = (hose->sg_isa->size - 1) & 0xfff00000;
   pci->pci_window[0].tbase.csr = virt_to_phys(hose->sg_isa->ptes);
   pci->pci_window[1].wbase.csr = 0x40000000 | 1;
   pci->pci_window[1].wmask.csr = (0x40000000 - 1) & 0xfff00000;
   pci->pci_window[1].tbase.csr = 0;
   pci->pci_window[2].wbase.csr = 0x80000000 | 1;
   pci->pci_window[2].wmask.csr = (0x40000000 - 1) & 0xfff00000;
   pci->pci_window[2].tbase.csr = 0x40000000;
   pci->pci_window[3].wbase.csr = hose->sg_pci->dma_base | 3;
   pci->pci_window[3].wmask.csr = (hose->sg_pci->size - 1) & 0xfff00000;
   pci->pci_window[3].tbase.csr = virt_to_phys(hose->sg_pci->ptes);
   wildfire_pci_tbi(hose, 0, 0); /* Flush TLB at the end. */
 }<sep>@@
expression hose, base, length;
@@

-	iommu_arena_new(hose, base, length, 0)
+	iommu_arena_new(hose, base, length, SMP_CACHE_BYTES)
--- initial
+++ final
@@ -1 +1 @@
-void __init alloc_bootmem_cpumask_var(cpumask_var_t *mask) { *mask = memblock_alloc(cpumask_size(), 0); }
+void __init alloc_bootmem_cpumask_var(cpumask_var_t *mask) { *mask = memblock_alloc(cpumask_size(), SMP_CACHE_BYTES); }<sep>@@
expression size, min_addr, max_addr, nid;
@@
(
- memblock_alloc_try_nid_raw(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_raw(size, SMP_CACHE_BYTES, min_addr, max_addr,nid)
|
- memblock_alloc_try_nid_nopanic(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_nopanic(size, SMP_CACHE_BYTES, min_addr, max_addr,nid)
|
- memblock_alloc_try_nid(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid(size, SMP_CACHE_BYTES, min_addr, max_addr, nid)
|
- memblock_alloc(size, 0)
+ memblock_alloc(size, SMP_CACHE_BYTES)
|
- memblock_alloc_raw(size, 0)
+ memblock_alloc_raw(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from(size, 0, min_addr)
+ memblock_alloc_from(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_nopanic(size, 0)
+ memblock_alloc_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low(size, 0)
+ memblock_alloc_low(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low_nopanic(size, 0)
+ memblock_alloc_low_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from_nopanic(size, 0, min_addr)
+ memblock_alloc_from_nopanic(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_node(size, 0, nid)
+ memblock_alloc_node(size, SMP_CACHE_BYTES, nid)
)
--- initial
+++ final
@@ -1,35 +1,35 @@
 void __init e820__reserve_resources(void) {
   int i;
   struct resource *res;
   u64 end;
-  res = memblock_alloc(sizeof(*res) * e820_table->nr_entries, 0);
+  res = memblock_alloc(sizeof(*res) * e820_table->nr_entries, SMP_CACHE_BYTES);
   e820_res = res;
   for (i = 0; i < e820_table->nr_entries; i++) {
     struct e820_entry *entry = e820_table->entries + i;
     end = entry->addr + entry->size - 1;
     if (end != (resource_size_t)end) {
       res++;
       continue;
     }
     res->start = entry->addr;
     res->end = end;
     res->name = e820_type_to_string(entry);
     res->flags = e820_type_to_iomem_type(entry);
     res->desc = e820_type_to_iores_desc(entry);
     /*
      * Don't register the region that could be conflicted with
      * PCI device BAR resources and insert them later in
      * pcibios_resource_survey():
      */
     if (do_mark_busy(entry->type, res)) {
       res->flags |= IORESOURCE_BUSY;
       insert_resource(&iomem_resource, res);
     }
     res++;
   }
   /* Expose the bootloader-provided memory layout to the sysfs. */
   for (i = 0; i < e820_table_firmware->nr_entries; i++) {
     struct e820_entry *entry = e820_table_firmware->entries + i;
     firmware_map_add_early(entry->addr, entry->addr + entry->size, e820_type_to_string(entry));
   }
 }<sep>@@
expression size, min_addr, max_addr, nid;
@@
(
- memblock_alloc_try_nid_raw(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_raw(size, SMP_CACHE_BYTES, min_addr, max_addr,nid)
|
- memblock_alloc_try_nid_nopanic(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_nopanic(size, SMP_CACHE_BYTES, min_addr, max_addr,nid)
|
- memblock_alloc_try_nid(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid(size, SMP_CACHE_BYTES, min_addr, max_addr, nid)
|
- memblock_alloc(size, 0)
+ memblock_alloc(size, SMP_CACHE_BYTES)
|
- memblock_alloc_raw(size, 0)
+ memblock_alloc_raw(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from(size, 0, min_addr)
+ memblock_alloc_from(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_nopanic(size, 0)
+ memblock_alloc_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low(size, 0)
+ memblock_alloc_low(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low_nopanic(size, 0)
+ memblock_alloc_low_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from_nopanic(size, 0, min_addr)
+ memblock_alloc_from_nopanic(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_node(size, 0, nid)
+ memblock_alloc_node(size, SMP_CACHE_BYTES, nid)
)
--- initial
+++ final
@@ -1,10 +1,10 @@
 void *__ref zalloc_maybe_bootmem(size_t size, gfp_t mask) {
   void *p;
   if (mem_init_done)
     p = kzalloc(size, mask);
   else {
-    p = memblock_alloc(size, 0);
+    p = memblock_alloc(size, SMP_CACHE_BYTES);
     if (p) memset(p, 0, size);
   }
   return p;
 }<sep>@@
expression size, min_addr, max_addr, nid;
@@
(
- memblock_alloc_try_nid_raw(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_raw(size, SMP_CACHE_BYTES, min_addr, max_addr,nid)
|
- memblock_alloc_try_nid_nopanic(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_nopanic(size, SMP_CACHE_BYTES, min_addr, max_addr,nid)
|
- memblock_alloc_try_nid(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid(size, SMP_CACHE_BYTES, min_addr, max_addr, nid)
|
- memblock_alloc(size, 0)
+ memblock_alloc(size, SMP_CACHE_BYTES)
|
- memblock_alloc_raw(size, 0)
+ memblock_alloc_raw(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from(size, 0, min_addr)
+ memblock_alloc_from(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_nopanic(size, 0)
+ memblock_alloc_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low(size, 0)
+ memblock_alloc_low(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low_nopanic(size, 0)
+ memblock_alloc_low_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from_nopanic(size, 0, min_addr)
+ memblock_alloc_from_nopanic(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_node(size, 0, nid)
+ memblock_alloc_node(size, SMP_CACHE_BYTES, nid)
)
--- initial
+++ final
@@ -1,21 +1,21 @@
 int __init read_initrd(void) {
   void *area;
   long long size;
   int err;
   if (initrd == NULL) return 0;
   err = os_file_size(initrd, &size);
   if (err) return 0;
   /*
    * This is necessary because alloc_bootmem craps out if you
    * ask for no memory.
    */
   if (size == 0) {
     printk(KERN_ERR "\"%s\" is a zero-size initrd\n", initrd);
     return 0;
   }
-  area = memblock_alloc(size, 0);
+  area = memblock_alloc(size, SMP_CACHE_BYTES);
   if (load_initrd(initrd, area, size) == -1) return 0;
   initrd_start = (unsigned long)area;
   initrd_end = initrd_start + size;
   return 0;
 }<sep>@@
expression size, min_addr, max_addr, nid;
@@
(
- memblock_alloc_try_nid_raw(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_raw(size, SMP_CACHE_BYTES, min_addr, max_addr,nid)
|
- memblock_alloc_try_nid_nopanic(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_nopanic(size, SMP_CACHE_BYTES, min_addr, max_addr,nid)
|
- memblock_alloc_try_nid(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid(size, SMP_CACHE_BYTES, min_addr, max_addr, nid)
|
- memblock_alloc(size, 0)
+ memblock_alloc(size, SMP_CACHE_BYTES)
|
- memblock_alloc_raw(size, 0)
+ memblock_alloc_raw(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from(size, 0, min_addr)
+ memblock_alloc_from(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_nopanic(size, 0)
+ memblock_alloc_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low(size, 0)
+ memblock_alloc_low(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low_nopanic(size, 0)
+ memblock_alloc_low_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from_nopanic(size, 0, min_addr)
+ memblock_alloc_from_nopanic(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_node(size, 0, nid)
+ memblock_alloc_node(size, SMP_CACHE_BYTES, nid)
)
--- initial
+++ final
@@ -1,21 +1,21 @@
 static struct resource *__init ioapic_setup_resources(void) {
   unsigned long n;
   struct resource *res;
   char *mem;
   int i;
   if (nr_ioapics == 0) return NULL;
   n = IOAPIC_RESOURCE_NAME_SIZE + sizeof(struct resource);
   n *= nr_ioapics;
-  mem = memblock_alloc(n, 0);
+  mem = memblock_alloc(n, SMP_CACHE_BYTES);
   res = (void *)mem;
   mem += sizeof(struct resource) * nr_ioapics;
   for_each_ioapic(i) {
     res[i].name = mem;
     res[i].flags = IORESOURCE_MEM | IORESOURCE_BUSY;
     snprintf(mem, IOAPIC_RESOURCE_NAME_SIZE, "IOAPIC %u", i);
     mem += IOAPIC_RESOURCE_NAME_SIZE;
     ioapics[i].iomem_res = &res[i];
   }
   ioapic_resources = res;
   return res;
 }<sep>@@
expression size, min_addr, max_addr, nid;
@@
(
- memblock_alloc_try_nid_raw(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_raw(size, SMP_CACHE_BYTES, min_addr, max_addr,nid)
|
- memblock_alloc_try_nid_nopanic(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_nopanic(size, SMP_CACHE_BYTES, min_addr, max_addr,nid)
|
- memblock_alloc_try_nid(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid(size, SMP_CACHE_BYTES, min_addr, max_addr, nid)
|
- memblock_alloc(size, 0)
+ memblock_alloc(size, SMP_CACHE_BYTES)
|
- memblock_alloc_raw(size, 0)
+ memblock_alloc_raw(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from(size, 0, min_addr)
+ memblock_alloc_from(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_nopanic(size, 0)
+ memblock_alloc_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low(size, 0)
+ memblock_alloc_low(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low_nopanic(size, 0)
+ memblock_alloc_low_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from_nopanic(size, 0, min_addr)
+ memblock_alloc_from_nopanic(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_node(size, 0, nid)
+ memblock_alloc_node(size, SMP_CACHE_BYTES, nid)
)
--- initial
+++ final
@@ -1,9 +1,9 @@
 void __init hubdev_init_node(nodepda_t *npda, cnodeid_t node) {
   struct hubdev_info *hubdev_info;
   int size;
   size = sizeof(struct hubdev_info);
   if (node >= num_online_nodes()) /* Headless/memless IO nodes */
     node = 0;
-  hubdev_info = (struct hubdev_info *)memblock_alloc_node(size, 0, node);
+  hubdev_info = (struct hubdev_info *)memblock_alloc_node(size, SMP_CACHE_BYTES, node);
   npda->pdinfo = (void *)hubdev_info;
 }<sep>@@
expression size, min_addr, max_addr, nid;
@@
(
- memblock_alloc_try_nid_raw(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_raw(size, SMP_CACHE_BYTES, min_addr, max_addr,nid)
|
- memblock_alloc_try_nid_nopanic(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_nopanic(size, SMP_CACHE_BYTES, min_addr, max_addr,nid)
|
- memblock_alloc_try_nid(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid(size, SMP_CACHE_BYTES, min_addr, max_addr, nid)
|
- memblock_alloc(size, 0)
+ memblock_alloc(size, SMP_CACHE_BYTES)
|
- memblock_alloc_raw(size, 0)
+ memblock_alloc_raw(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from(size, 0, min_addr)
+ memblock_alloc_from(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_nopanic(size, 0)
+ memblock_alloc_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low(size, 0)
+ memblock_alloc_low(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low_nopanic(size, 0)
+ memblock_alloc_low_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from_nopanic(size, 0, min_addr)
+ memblock_alloc_from_nopanic(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_node(size, 0, nid)
+ memblock_alloc_node(size, SMP_CACHE_BYTES, nid)
)
--- initial
+++ final
@@ -1,42 +1,42 @@
 static void __init resource_init(void) {
   int i;
   if (UNCAC_BASE != IO_BASE) return;
   code_resource.start = __pa_symbol(&_text);
   code_resource.end = __pa_symbol(&_etext) - 1;
   data_resource.start = __pa_symbol(&_etext);
   data_resource.end = __pa_symbol(&_edata) - 1;
   bss_resource.start = __pa_symbol(&__bss_start);
   bss_resource.end = __pa_symbol(&__bss_stop) - 1;
   for (i = 0; i < boot_mem_map.nr_map; i++) {
     struct resource *res;
     unsigned long start, end;
     start = boot_mem_map.map[i].addr;
     end = boot_mem_map.map[i].addr + boot_mem_map.map[i].size - 1;
     if (start >= HIGHMEM_START) continue;
     if (end >= HIGHMEM_START) end = HIGHMEM_START - 1;
-    res = memblock_alloc(sizeof(struct resource), 0);
+    res = memblock_alloc(sizeof(struct resource), SMP_CACHE_BYTES);
     res->start = start;
     res->end = end;
     res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
     switch (boot_mem_map.map[i].type) {
     case BOOT_MEM_RAM:
     case BOOT_MEM_INIT_RAM:
     case BOOT_MEM_ROM_DATA:
       res->name = "System RAM";
       res->flags |= IORESOURCE_SYSRAM;
       break;
     case BOOT_MEM_RESERVED:
     default: res->name = "reserved";
     }
     request_resource(&iomem_resource, res);
     /*
      *  We don't know which RAM region contains kernel data,
      *  so we try it repeatedly and let the resource manager
      *  test it.
      */
     request_resource(res, &code_resource);
     request_resource(res, &data_resource);
     request_resource(res, &bss_resource);
     request_crashkernel(res);
   }
 }<sep>@@
expression size, min_addr, max_addr, nid;
@@
(
- memblock_alloc_try_nid_raw(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_raw(size, SMP_CACHE_BYTES, min_addr, max_addr,nid)
|
- memblock_alloc_try_nid_nopanic(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_nopanic(size, SMP_CACHE_BYTES, min_addr, max_addr,nid)
|
- memblock_alloc_try_nid(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid(size, SMP_CACHE_BYTES, min_addr, max_addr, nid)
|
- memblock_alloc(size, 0)
+ memblock_alloc(size, SMP_CACHE_BYTES)
|
- memblock_alloc_raw(size, 0)
+ memblock_alloc_raw(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from(size, 0, min_addr)
+ memblock_alloc_from(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_nopanic(size, 0)
+ memblock_alloc_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low(size, 0)
+ memblock_alloc_low(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low_nopanic(size, 0)
+ memblock_alloc_low_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from_nopanic(size, 0, min_addr)
+ memblock_alloc_from_nopanic(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_node(size, 0, nid)
+ memblock_alloc_node(size, SMP_CACHE_BYTES, nid)
)
--- initial
+++ final
@@ -1,7 +1,7 @@
 static void __init setup_command_line(char *command_line) {
-  saved_command_line = memblock_alloc(strlen(boot_command_line) + 1, 0);
-  initcall_command_line = memblock_alloc(strlen(boot_command_line) + 1, 0);
-  static_command_line = memblock_alloc(strlen(command_line) + 1, 0);
+  saved_command_line = memblock_alloc(strlen(boot_command_line) + 1, SMP_CACHE_BYTES);
+  initcall_command_line = memblock_alloc(strlen(boot_command_line) + 1, SMP_CACHE_BYTES);
+  static_command_line = memblock_alloc(strlen(command_line) + 1, SMP_CACHE_BYTES);
   strcpy(saved_command_line, boot_command_line);
   strcpy(static_command_line, command_line);
 }<sep>@@
expression size, min_addr, max_addr, nid;
@@
(
- memblock_alloc_try_nid_raw(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_raw(size, SMP_CACHE_BYTES, min_addr, max_addr,nid)
|
- memblock_alloc_try_nid_nopanic(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_nopanic(size, SMP_CACHE_BYTES, min_addr, max_addr,nid)
|
- memblock_alloc_try_nid(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid(size, SMP_CACHE_BYTES, min_addr, max_addr, nid)
|
- memblock_alloc(size, 0)
+ memblock_alloc(size, SMP_CACHE_BYTES)
|
- memblock_alloc_raw(size, 0)
+ memblock_alloc_raw(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from(size, 0, min_addr)
+ memblock_alloc_from(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_nopanic(size, 0)
+ memblock_alloc_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low(size, 0)
+ memblock_alloc_low(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low_nopanic(size, 0)
+ memblock_alloc_low_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from_nopanic(size, 0, min_addr)
+ memblock_alloc_from_nopanic(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_node(size, 0, nid)
+ memblock_alloc_node(size, SMP_CACHE_BYTES, nid)
)
--- initial
+++ final
@@ -1,6 +1,6 @@
 int __init firmware_map_add_early(u64 start, u64 end, const char *type) {
   struct firmware_map_entry *entry;
-  entry = memblock_alloc(sizeof(struct firmware_map_entry), 0);
+  entry = memblock_alloc(sizeof(struct firmware_map_entry), SMP_CACHE_BYTES);
   if (WARN_ON(!entry)) return -ENOMEM;
   return firmware_map_add_entry(start, end, type, entry);
 }<sep>@@
expression size, min_addr, max_addr, nid;
@@
(
- memblock_alloc_try_nid_raw(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_raw(size, SMP_CACHE_BYTES, min_addr, max_addr,nid)
|
- memblock_alloc_try_nid_nopanic(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid_nopanic(size, SMP_CACHE_BYTES, min_addr, max_addr,nid)
|
- memblock_alloc_try_nid(size, 0, min_addr, max_addr, nid)
+ memblock_alloc_try_nid(size, SMP_CACHE_BYTES, min_addr, max_addr, nid)
|
- memblock_alloc(size, 0)
+ memblock_alloc(size, SMP_CACHE_BYTES)
|
- memblock_alloc_raw(size, 0)
+ memblock_alloc_raw(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from(size, 0, min_addr)
+ memblock_alloc_from(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_nopanic(size, 0)
+ memblock_alloc_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low(size, 0)
+ memblock_alloc_low(size, SMP_CACHE_BYTES)
|
- memblock_alloc_low_nopanic(size, 0)
+ memblock_alloc_low_nopanic(size, SMP_CACHE_BYTES)
|
- memblock_alloc_from_nopanic(size, 0, min_addr)
+ memblock_alloc_from_nopanic(size, SMP_CACHE_BYTES, min_addr)
|
- memblock_alloc_node(size, 0, nid)
+ memblock_alloc_node(size, SMP_CACHE_BYTES, nid)
)