Skip to contentSkip to conversation

x86 updates for v2.6.28, phase #2 - PAT updates

GIT PULL Ingo Molnar 2 participants 11 messages Oct 9, 2008 – Oct 10, 2008

Subsystems (6)
Memory management x86 MM core x86 MM +2 more subsystems
lore
Share & tools
lore
#0 lore raw

Linus,

Please pull the latest x86-v28-for-linus-phase2 git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-v28-for-linus-phase2

these are the x86/pat optimizations and updates - with impact on AGP drivers:

out-of-topic modifications in x86-v28-for-linus-phase2:
-------------------------------------------------------
drivers/char/agp/agp.h # bd07928: agp: add agp_generic_destroy_page
# 37acee1: agp: generic_alloc_pages() # 9326d61: Revert "reduce tlb/cache flush ti # 466ae83: reduce tlb/cache flush times of a

drivers/char/agp/alpha-agp.c       # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/amd-k7-agp.c      # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/amd64-agp.c       # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/ati-agp.c         # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/efficeon-agp.c    # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/generic.c         # bd07928: agp: add agp_generic_destroy_page
                                   # 37acee1: agp: generic_alloc_pages()
                                   # 9326d61: Revert "reduce tlb/cache flush ti
                                   # 466ae83: reduce tlb/cache flush times of a
drivers/char/agp/hp-agp.c          # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/i460-agp.c        # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/intel-agp.c       # bd07928: agp: add agp_generic_destroy_page
                                   # 37acee1: agp: generic_alloc_pages()
drivers/char/agp/nvidia-agp.c      # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/parisc-agp.c      # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/sis-agp.c         # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/sworks-agp.c      # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/uninorth-agp.c    # c09ff7e: linux-next: fix x86 tree build fa

# 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/via-agp.c # 5f310b6: agp: enable optimized agp_alloc_p
mm/highmem.c # 5843d9a: x86, pat: avoid highmem cache att

Thanks,

Ingo

------------------>
Andreas Herrmann (1):
x86: compile pat debugfs interface only if CONFIG_X86_PAT is set

Ingo Molnar (12):
Revert "reduce tlb/cache flush times of agpgart memory allocation"
Revert "introduce two APIs for page attribute"
Revert "x86: handle error returns in set_memory_*()"
Revert "x86: track memtype for RAM in page struct"
Revert "x86, cpa: global flush tlb after splitting large page and before doing cpa" Revert "x86, cpa: remove cpa pool code"
Revert "x86, cpa: fix taking the pgd_lock with interrupts off"
Revert "x86, cpa: dont use large pages for kernel identity mapping with DEBUG_PAGEALLOC" Revert "x86, cpa: make the kernel physical mapping initialization a two pass sequence" Revert "x86, cpa: remove USER permission from the very early identity mapping attribute" Revert "x86, cpa: rename PTE attribute macros for kernel direct mapping in early boot" x86, pat: cleanups

Jeremy Fitzhardinge (1):
x86: make sure the CPA test code's use of _PAGE_UNUSED1 is obvious

Nick Piggin (1):
x86, pat: avoid highmem cache attribute aliasing

Rene Herman (3):
x86: {reverve,free}_memtype() take a physical address
x86: have set_memory_array_{uc,wb} coalesce memtypes.
agp: enable optimized agp_alloc_pages methods

Shaohua Li (6):
introduce two APIs for page attribute
reduce tlb/cache flush times of agpgart memory allocation x86, pageattr: introduce APIs to change pageattr of a page array
agp: generic_alloc_pages()
agp: add agp_generic_destroy_pages()
x86: fix pageattr-test

Stephen Rothwell (1):
linux-next: fix x86 tree build failure

Suresh Siddha (17):
x86, cpa: rename PTE attribute macros for kernel direct mapping in early boot x86, cpa: remove USER permission from the very early identity mapping attribute x86, cpa: make the kernel physical mapping initialization a two pass sequence x86, cpa: dont use large pages for kernel identity mapping with DEBUG_PAGEALLOC x86, cpa: fix taking the pgd_lock with interrupts off
x86, cpa: remove cpa pool code
x86, cpa: global flush tlb after splitting large page and before doing cpa
x86: track memtype for RAM in page struct
x86, cpa: rename PTE attribute macros for kernel direct mapping in early boot x86, cpa: remove USER permission from the very early identity mapping attribute x86, cpa: make the kernel physical mapping initialization a two pass sequence x86, cpa: dont use large pages for kernel identity mapping with DEBUG_PAGEALLOC x86, cpa: no need to check alias for __set_pages_p/__set_pages_np x86, cpa: remove cpa pool code
x86, cpa: srlz cpa(), global flush tlb after splitting big page and before doing cpa
x86: track memtype for RAM in page struct
x86: fix pagetable init 64-bit breakage

Venkatesh Pallipadi (1):
x86: handle error returns in set_memory_*()

Venki Pallipadi (1):
x86: have set_memory_array_{uc,wb} coalesce memtypes, fix

 arch/x86/kernel/head_32.S       |   34 ++--
 arch/x86/kernel/head_64.S       |    4 +-
 arch/x86/mm/init_32.c           |   84 +++++++-
 arch/x86/mm/init_64.c           |  127 +++++++++--
 arch/x86/mm/ioremap.c           |   19 ++
 arch/x86/mm/pageattr-test.c     |    9 +-
 arch/x86/mm/pageattr.c          |  459 +++++++++++++++++++++------------------
 arch/x86/mm/pat.c               |  132 +++++++++---
 drivers/char/agp/agp.h          |    5 +
 drivers/char/agp/alpha-agp.c    |    2 +
 drivers/char/agp/amd-k7-agp.c   |    2 +
 drivers/char/agp/amd64-agp.c    |    2 +
 drivers/char/agp/ati-agp.c      |    2 +
 drivers/char/agp/efficeon-agp.c |    2 +
 drivers/char/agp/generic.c      |   97 ++++++++-
 drivers/char/agp/hp-agp.c       |    2 +
 drivers/char/agp/i460-agp.c     |    2 +
 drivers/char/agp/intel-agp.c    |   28 +++
 drivers/char/agp/nvidia-agp.c   |    2 +
 drivers/char/agp/parisc-agp.c   |    2 +
 drivers/char/agp/sis-agp.c      |    2 +
 drivers/char/agp/sworks-agp.c   |    2 +
 drivers/char/agp/uninorth-agp.c |    4 +
 drivers/char/agp/via-agp.c      |    4 +
 include/asm-x86/cacheflush.h    |    7 +-
 include/asm-x86/page.h          |    1 +
 include/asm-x86/pgtable.h       |   13 +
 mm/highmem.c                    |    5 +-
 28 files changed, 752 insertions(+), 302 deletions(-)
arch/x86/kernel/head_32.S +15 -19
index a7010c3..e835b4e 100644
@@ -172,10 +172,6 @@ num_subarch_entries = (. - subarch_entries) / 4
  *
  * Note that the stack is not yet set up!
  */
-#define PTE_ATTR	0x007		/* PRESENT+RW+USER */
-#define PDE_ATTR	0x067		/* PRESENT+RW+USER+DIRTY+ACCESSED */
-#define PGD_ATTR	0x001		/* PRESENT (no other attributes) */
-
 default_entry:
 #ifdef CONFIG_X86_PAE
 
@@ -196,9 +192,9 @@ default_entry:
 	movl $pa(pg0), %edi
 	movl %edi, pa(init_pg_tables_start)
 	movl $pa(swapper_pg_pmd), %edx
-	movl $PTE_ATTR, %eax
+	movl $PTE_IDENT_ATTR, %eax
 10:
-	leal PDE_ATTR(%edi),%ecx		/* Create PMD entry */
+	leal PDE_IDENT_ATTR(%edi),%ecx		/* Create PMD entry */
 	movl %ecx,(%edx)			/* Store PMD entry */
 						/* Upper half already zero */
 	addl $8,%edx
@@ -215,7 +211,7 @@ default_entry:
 	 * End condition: we must map up to and including INIT_MAP_BEYOND_END
 	 * bytes beyond the end of our own page tables.
 	 */
-	leal (INIT_MAP_BEYOND_END+PTE_ATTR)(%edi),%ebp
+	leal (INIT_MAP_BEYOND_END+PTE_IDENT_ATTR)(%edi),%ebp
 	cmpl %ebp,%eax
 	jb 10b
 1:
@@ -224,7 +220,7 @@ default_entry:
 	movl %eax, pa(max_pfn_mapped)
 
 	/* Do early initialization of the fixmap area */
-	movl $pa(swapper_pg_fixmap)+PDE_ATTR,%eax
+	movl $pa(swapper_pg_fixmap)+PDE_IDENT_ATTR,%eax
 	movl %eax,pa(swapper_pg_pmd+0x1000*KPMDS-8)
 #else	/* Not PAE */
 
@@ -233,9 +229,9 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
 	movl $pa(pg0), %edi
 	movl %edi, pa(init_pg_tables_start)
 	movl $pa(swapper_pg_dir), %edx
-	movl $PTE_ATTR, %eax
+	movl $PTE_IDENT_ATTR, %eax
 10:
-	leal PDE_ATTR(%edi),%ecx		/* Create PDE entry */
+	leal PDE_IDENT_ATTR(%edi),%ecx		/* Create PDE entry */
 	movl %ecx,(%edx)			/* Store identity PDE entry */
 	movl %ecx,page_pde_offset(%edx)		/* Store kernel PDE entry */
 	addl $4,%edx
@@ -249,7 +245,7 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
 	 * bytes beyond the end of our own page tables; the +0x007 is
 	 * the attribute bits
 	 */
-	leal (INIT_MAP_BEYOND_END+PTE_ATTR)(%edi),%ebp
+	leal (INIT_MAP_BEYOND_END+PTE_IDENT_ATTR)(%edi),%ebp
 	cmpl %ebp,%eax
 	jb 10b
 	movl %edi,pa(init_pg_tables_end)
@@ -257,7 +253,7 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
 	movl %eax, pa(max_pfn_mapped)
 
 	/* Do early initialization of the fixmap area */
-	movl $pa(swapper_pg_fixmap)+PDE_ATTR,%eax
+	movl $pa(swapper_pg_fixmap)+PDE_IDENT_ATTR,%eax
 	movl %eax,pa(swapper_pg_dir+0xffc)
 #endif
 	jmp 3f
@@ -634,19 +630,19 @@ ENTRY(empty_zero_page)
 	/* Page-aligned for the benefit of paravirt? */
 	.align PAGE_SIZE_asm
 ENTRY(swapper_pg_dir)
-	.long	pa(swapper_pg_pmd+PGD_ATTR),0		/* low identity map */
+	.long	pa(swapper_pg_pmd+PGD_IDENT_ATTR),0	/* low identity map */
 # if KPMDS == 3
-	.long	pa(swapper_pg_pmd+PGD_ATTR),0
-	.long	pa(swapper_pg_pmd+PGD_ATTR+0x1000),0
-	.long	pa(swapper_pg_pmd+PGD_ATTR+0x2000),0
+	.long	pa(swapper_pg_pmd+PGD_IDENT_ATTR),0
+	.long	pa(swapper_pg_pmd+PGD_IDENT_ATTR+0x1000),0
+	.long	pa(swapper_pg_pmd+PGD_IDENT_ATTR+0x2000),0
 # elif KPMDS == 2
 	.long	0,0
-	.long	pa(swapper_pg_pmd+PGD_ATTR),0
-	.long	pa(swapper_pg_pmd+PGD_ATTR+0x1000),0
+	.long	pa(swapper_pg_pmd+PGD_IDENT_ATTR),0
+	.long	pa(swapper_pg_pmd+PGD_IDENT_ATTR+0x1000),0
 # elif KPMDS == 1
 	.long	0,0
 	.long	0,0
-	.long	pa(swapper_pg_pmd+PGD_ATTR),0
+	.long	pa(swapper_pg_pmd+PGD_IDENT_ATTR),0
 # else
 #  error "Kernel PMDs should be 1, 2 or 3"
 # endif
arch/x86/kernel/head_64.S +2 -2
index db3280a..26cfdc1 100644
@@ -110,7 +110,7 @@ startup_64:
 	movq	%rdi, %rax
 	shrq	$PMD_SHIFT, %rax
 	andq	$(PTRS_PER_PMD - 1), %rax
-	leaq	__PAGE_KERNEL_LARGE_EXEC(%rdi), %rdx
+	leaq	__PAGE_KERNEL_IDENT_LARGE_EXEC(%rdi), %rdx
 	leaq	level2_spare_pgt(%rip), %rbx
 	movq	%rdx, 0(%rbx, %rax, 8)
 ident_complete:
@@ -374,7 +374,7 @@ NEXT_PAGE(level2_ident_pgt)
 	/* Since I easily can, map the first 1G.
 	 * Don't set NX because code runs from these pages.
 	 */
-	PMDS(0, __PAGE_KERNEL_LARGE_EXEC, PTRS_PER_PMD)
+	PMDS(0, __PAGE_KERNEL_IDENT_LARGE_EXEC, PTRS_PER_PMD)
 
 NEXT_PAGE(level2_kernel_pgt)
 	/*
arch/x86/mm/init_32.c +74 -10

155 lines not on this page · raw message

arch/x86/mm/init_64.c +104 -23

258 lines not on this page · raw message

arch/x86/mm/ioremap.c +19 -0
index cac6da5..6ab3196 100644
@@ -83,6 +83,25 @@ int page_is_ram(unsigned long pagenr)
 	return 0;
 }
 
+int pagerange_is_ram(unsigned long start, unsigned long end)
+{
+	int ram_page = 0, not_rampage = 0;
+	unsigned long page_nr;
+
+	for (page_nr = (start >> PAGE_SHIFT); page_nr < (end >> PAGE_SHIFT);
+	     ++page_nr) {
+		if (page_is_ram(page_nr))
+			ram_page = 1;
+		else
+			not_rampage = 1;
+
+		if (ram_page == not_rampage)
+			return -1;
+	}
+
+	return ram_page;
+}
+
 /*
  * Fix up the linear direct mapping of the kernel to avoid cache attribute
  * conflicts.
arch/x86/mm/pageattr-test.c +6 -3
index d4aa503..e1d1069 100644
@@ -32,7 +32,7 @@ enum {
 	GPS			= (1<<30)
 };
 
-#define PAGE_TESTBIT	__pgprot(_PAGE_UNUSED1)
+#define PAGE_CPA_TEST	__pgprot(_PAGE_CPA_TEST)
 
 static int pte_testbit(pte_t pte)
 {
@@ -118,6 +118,7 @@ static int pageattr_test(void)
 	unsigned int level;
 	int i, k;
 	int err;
+	unsigned long test_addr;
 
 	if (print)
 		printk(KERN_INFO "CPA self-test:\n");
@@ -172,7 +173,8 @@ static int pageattr_test(void)
 			continue;
 		}
 
-		err = change_page_attr_set(addr[i], len[i], PAGE_TESTBIT);
+		test_addr = addr[i];
+		err = change_page_attr_set(&test_addr, len[i], PAGE_CPA_TEST, 0);
 		if (err < 0) {
 			printk(KERN_ERR "CPA %d failed %d\n", i, err);
 			failed++;
@@ -204,7 +206,8 @@ static int pageattr_test(void)
 			failed++;
 			continue;
 		}
-		err = change_page_attr_clear(addr[i], len[i], PAGE_TESTBIT);
+		test_addr = addr[i];
+		err = change_page_attr_clear(&test_addr, len[i], PAGE_CPA_TEST, 0);
 		if (err < 0) {
 			printk(KERN_ERR "CPA reverting failed: %d\n", err);
 			failed++;
arch/x86/mm/pageattr.c +251 -208

701 lines not on this page · raw message

arch/x86/mm/pat.c +106 -26

251 lines not on this page · raw message

drivers/char/agp/agp.h +5 -0
index 4bada0e..46f5075 100644
@@ -116,7 +116,9 @@ struct agp_bridge_driver {
 	struct agp_memory *(*alloc_by_type) (size_t, int);
 	void (*free_by_type)(struct agp_memory *);
 	void *(*agp_alloc_page)(struct agp_bridge_data *);
+	int (*agp_alloc_pages)(struct agp_bridge_data *, struct agp_memory *, size_t);
 	void (*agp_destroy_page)(void *, int flags);
+	void (*agp_destroy_pages)(struct agp_memory *);
 	int (*agp_type_to_mask_type) (struct agp_bridge_data *, int);
 	void (*chipset_flush)(struct agp_bridge_data *);
 };
@@ -277,7 +279,10 @@ int agp_generic_remove_memory(struct agp_memory *mem, off_t pg_start, int type);
 struct agp_memory *agp_generic_alloc_by_type(size_t page_count, int type);
 void agp_generic_free_by_type(struct agp_memory *curr);
 void *agp_generic_alloc_page(struct agp_bridge_data *bridge);
+int agp_generic_alloc_pages(struct agp_bridge_data *agp_bridge,
+			    struct agp_memory *memory, size_t page_count);
 void agp_generic_destroy_page(void *addr, int flags);
+void agp_generic_destroy_pages(struct agp_memory *memory);
 void agp_free_key(int key);
 int agp_num_entries(void);
 u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 mode, u32 command);
drivers/char/agp/alpha-agp.c +2 -0
index 5da89f6..5ea4da8 100644
@@ -143,7 +143,9 @@ struct agp_bridge_driver alpha_core_agp_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
drivers/char/agp/amd-k7-agp.c +2 -0
index e280531..603a986 100644
@@ -386,7 +386,9 @@ static const struct agp_bridge_driver amd_irongate_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
drivers/char/agp/amd64-agp.c +2 -0
index 7495c52..2812ee2 100644
@@ -224,7 +224,9 @@ static const struct agp_bridge_driver amd_8151_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
drivers/char/agp/ati-agp.c +2 -0
index 6ecbcaf..ae2791b 100644
@@ -418,7 +418,9 @@ static const struct agp_bridge_driver ati_generic_bridge = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
drivers/char/agp/efficeon-agp.c +2 -0
index 8ca6f26..453543a 100644
@@ -335,7 +335,9 @@ static const struct agp_bridge_driver efficeon_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
drivers/char/agp/generic.c +89 -8

121 lines not on this page · raw message

drivers/char/agp/hp-agp.c +2 -0
index 80d7317..183ac3f 100644
@@ -435,7 +435,9 @@ const struct agp_bridge_driver hp_zx1_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 	.cant_use_aperture	= true,
 };
drivers/char/agp/i460-agp.c +2 -0
index e587eeb..10da687 100644
@@ -575,7 +575,9 @@ const struct agp_bridge_driver intel_i460_driver = {
 	.insert_memory		= i460_insert_memory_small_io_page,
 	.remove_memory		= i460_remove_memory_small_io_page,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 #endif
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
drivers/char/agp/intel-agp.c +28 -0
index 016fdf0..043e366 100644
@@ -1711,7 +1711,9 @@ static const struct agp_bridge_driver intel_generic_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
@@ -1736,7 +1738,9 @@ static const struct agp_bridge_driver intel_810_driver = {
 	.alloc_by_type		= intel_i810_alloc_by_type,
 	.free_by_type		= intel_i810_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
@@ -1760,7 +1764,9 @@ static const struct agp_bridge_driver intel_815_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type	= agp_generic_type_to_mask_type,
 };
 
@@ -1785,7 +1791,9 @@ static const struct agp_bridge_driver intel_830_driver = {
 	.alloc_by_type		= intel_i830_alloc_by_type,
 	.free_by_type		= intel_i810_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = intel_i830_type_to_mask_type,
 	.chipset_flush		= intel_i830_chipset_flush,
 };
@@ -1810,7 +1818,9 @@ static const struct agp_bridge_driver intel_820_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
@@ -1834,7 +1844,9 @@ static const struct agp_bridge_driver intel_830mp_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
@@ -1858,7 +1870,9 @@ static const struct agp_bridge_driver intel_840_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
@@ -1882,7 +1896,9 @@ static const struct agp_bridge_driver intel_845_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 	.chipset_flush		= intel_i830_chipset_flush,
 };
@@ -1907,7 +1923,9 @@ static const struct agp_bridge_driver intel_850_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
@@ -1931,7 +1949,9 @@ static const struct agp_bridge_driver intel_860_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
@@ -1956,7 +1976,9 @@ static const struct agp_bridge_driver intel_915_driver = {
 	.alloc_by_type		= intel_i830_alloc_by_type,
 	.free_by_type		= intel_i810_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = intel_i830_type_to_mask_type,
 	.chipset_flush		= intel_i915_chipset_flush,
 };
@@ -1982,7 +2004,9 @@ static const struct agp_bridge_driver intel_i965_driver = {
 	.alloc_by_type		= intel_i830_alloc_by_type,
 	.free_by_type		= intel_i810_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type	= intel_i830_type_to_mask_type,
 	.chipset_flush		= intel_i915_chipset_flush,
 };
@@ -2007,7 +2031,9 @@ static const struct agp_bridge_driver intel_7505_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
@@ -2032,7 +2058,9 @@ static const struct agp_bridge_driver intel_g33_driver = {
 	.alloc_by_type		= intel_i830_alloc_by_type,
 	.free_by_type		= intel_i810_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type	= intel_i830_type_to_mask_type,
 	.chipset_flush		= intel_i915_chipset_flush,
 };
drivers/char/agp/nvidia-agp.c +2 -0
index eaceb61..dc70d37 100644
@@ -312,7 +312,9 @@ static const struct agp_bridge_driver nvidia_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
drivers/char/agp/parisc-agp.c +2 -0
index 8c42dcc..f2492ec 100644
@@ -224,7 +224,9 @@ static const struct agp_bridge_driver parisc_agp_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 	.cant_use_aperture	= true,
 };
drivers/char/agp/sis-agp.c +2 -0
index 2587ef9..6c3837a 100644
@@ -140,7 +140,9 @@ static struct agp_bridge_driver sis_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
drivers/char/agp/sworks-agp.c +2 -0
index 2fb27fe..6224df8 100644
@@ -437,7 +437,9 @@ static const struct agp_bridge_driver sworks_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
drivers/char/agp/uninorth-agp.c +4 -0
index eef7270..0f004b6 100644
@@ -509,7 +509,9 @@ const struct agp_bridge_driver uninorth_agp_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 	.cant_use_aperture	= true,
 };
@@ -534,7 +536,9 @@ const struct agp_bridge_driver u3_agp_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 	.cant_use_aperture	= true,
 	.needs_scratch_page	= true,
drivers/char/agp/via-agp.c +4 -0
index 7b36476..9f4d49e 100644
@@ -190,7 +190,9 @@ static const struct agp_bridge_driver via_agp3_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
@@ -214,7 +216,9 @@ static const struct agp_bridge_driver via_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
include/asm-x86/cacheflush.h +5 -2
index 59859cb..68840ef 100644
@@ -24,6 +24,8 @@
 #define copy_from_user_page(vma, page, vaddr, dst, src, len)	\
 	memcpy((dst), (src), (len))
 
+#define PG_non_WB				PG_arch_1
+PAGEFLAG(NonWB, non_WB)
 
 /*
  * The set_memory_* API can be used to change various attributes of a virtual
@@ -66,6 +68,9 @@ int set_memory_rw(unsigned long addr, int numpages);
 int set_memory_np(unsigned long addr, int numpages);
 int set_memory_4k(unsigned long addr, int numpages);
 
+int set_memory_array_uc(unsigned long *addr, int addrinarray);
+int set_memory_array_wb(unsigned long *addr, int addrinarray);
+
 /*
  * For legacy compatibility with the old APIs, a few functions
  * are provided that work on a "struct page".
@@ -96,8 +101,6 @@ int set_pages_rw(struct page *page, int numpages);
 
 void clflush_cache_range(void *addr, unsigned int size);
 
-void cpa_init(void);
-
 #ifdef CONFIG_DEBUG_RODATA
 void mark_rodata_ro(void);
 extern const int rodata_test_data;
include/asm-x86/page.h +1 -0
index 79544e6..c915747 100644
@@ -57,6 +57,7 @@ typedef struct { pgdval_t pgd; } pgd_t;
 typedef struct { pgprotval_t pgprot; } pgprot_t;
 
 extern int page_is_ram(unsigned long pagenr);
+extern int pagerange_is_ram(unsigned long start, unsigned long end);
 extern int devmem_is_allowed(unsigned long pagenr);
 extern void map_devmem(unsigned long pfn, unsigned long size,
 		       pgprot_t vma_prot);
include/asm-x86/pgtable.h +13 -0
index 888add7..ed93245 100644
@@ -19,6 +19,7 @@
 #define _PAGE_BIT_UNUSED3	11
 #define _PAGE_BIT_PAT_LARGE	12	/* On 2MB or 1GB pages */
 #define _PAGE_BIT_SPECIAL	_PAGE_BIT_UNUSED1
+#define _PAGE_BIT_CPA_TEST	_PAGE_BIT_UNUSED1
 #define _PAGE_BIT_NX           63       /* No execute: only valid after cpuid check */
 
 #define _PAGE_PRESENT	(_AT(pteval_t, 1) << _PAGE_BIT_PRESENT)
@@ -36,6 +37,7 @@
 #define _PAGE_PAT	(_AT(pteval_t, 1) << _PAGE_BIT_PAT)
 #define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE)
 #define _PAGE_SPECIAL	(_AT(pteval_t, 1) << _PAGE_BIT_SPECIAL)
+#define _PAGE_CPA_TEST	(_AT(pteval_t, 1) << _PAGE_BIT_CPA_TEST)
 #define __HAVE_ARCH_PTE_SPECIAL
 
 #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
@@ -130,6 +132,17 @@
 #define __S110	PAGE_SHARED_EXEC
 #define __S111	PAGE_SHARED_EXEC
 
+/*
+ * early identity mapping  pte attrib macros.
+ */
+#ifdef CONFIG_X86_64
+#define __PAGE_KERNEL_IDENT_LARGE_EXEC	__PAGE_KERNEL_LARGE_EXEC
+#else
+#define PTE_IDENT_ATTR	 0x003		/* PRESENT+RW */
+#define PDE_IDENT_ATTR	 0x063		/* PRESENT+RW+DIRTY+ACCESSED */
+#define PGD_IDENT_ATTR	 0x001		/* PRESENT (no other attributes) */
+#endif
+
 #ifndef __ASSEMBLY__
 
 /*
mm/highmem.c +4 -1
index e16e152..b36b83b 100644
@@ -70,6 +70,7 @@ static DECLARE_WAIT_QUEUE_HEAD(pkmap_map_wait);
 static void flush_all_zero_pkmaps(void)
 {
 	int i;
+	int need_flush = 0;
 
 	flush_cache_kmaps();
 
@@ -101,8 +102,10 @@ static void flush_all_zero_pkmaps(void)
 			  &pkmap_page_table[i]);
 
 		set_page_address(page, NULL);
+		need_flush = 1;
 	}
-	flush_tlb_kernel_range(PKMAP_ADDR(0), PKMAP_ADDR(LAST_PKMAP));
+	if (need_flush)
+		flush_tlb_kernel_range(PKMAP_ADDR(0), PKMAP_ADDR(LAST_PKMAP));
 }
 
 /**
#1 lore raw
Quoted 14 lines · Ingo Molnar

Ingo Molnar (12):
Revert "reduce tlb/cache flush times of agpgart memory allocation"
Revert "introduce two APIs for page attribute"
Revert "x86: handle error returns in set_memory_*()"
Revert "x86: track memtype for RAM in page struct"
Revert "x86, cpa: global flush tlb after splitting large page and before doing cpa" Revert "x86, cpa: remove cpa pool code"
Revert "x86, cpa: fix taking the pgd_lock with interrupts off"
Revert "x86, cpa: dont use large pages for kernel identity mapping with DEBUG_PAGEALLOC" Revert "x86, cpa: make the kernel physical mapping initialization a two pass sequence" Revert "x86, cpa: remove USER permission from the very early identity mapping attribute" Revert "x86, cpa: rename PTE attribute macros for kernel direct mapping in early boot" x86, pat: cleanups

So half of the commits by Suresh were reverted.

Not only that, they were reverted WITH ABSOLUTELY NO EXPLANATIONS OF WHY THEY WERE CLEARLY BUGGY PILES OF CRUD. The revert messages are just things like

This reverts commit <sha1>.

which makes both the original commit _and_ the revert just totally pointless, because we didn't learn anything.

So tell me exactly why I should pull this series again? Why should I ever pull _any_ tree that cannot explain its commits?

Next time you revert, explain _why_. And if a tree has this many reverts (and by "this many" I mean "dammit, there are three times as many commits as there should be, because a third of the commits are crap, a third of the commits are reverts of that crap, and a third of the commits actually remain"), why should I pull it again?

In other words, why shouldn't I just think that this whole branch is a total failure, which is what I think right now?

Linus

#2 lore raw
Quoted 18 lines · Linus Torvalds
Quoted 14 lines · Ingo Molnar

Ingo Molnar (12):
Revert "reduce tlb/cache flush times of agpgart memory allocation"
Revert "introduce two APIs for page attribute"
Revert "x86: handle error returns in set_memory_*()"
Revert "x86: track memtype for RAM in page struct"
Revert "x86, cpa: global flush tlb after splitting large page and before doing cpa" Revert "x86, cpa: remove cpa pool code"
Revert "x86, cpa: fix taking the pgd_lock with interrupts off"
Revert "x86, cpa: dont use large pages for kernel identity mapping with DEBUG_PAGEALLOC" Revert "x86, cpa: make the kernel physical mapping initialization a two pass sequence" Revert "x86, cpa: remove USER permission from the very early identity mapping attribute" Revert "x86, cpa: rename PTE attribute macros for kernel direct mapping in early boot" x86, pat: cleanups

So half of the commits by Suresh were reverted.

Quoted 8 lines

Not only that, they were reverted WITH ABSOLUTELY NO EXPLANATIONS OF WHY THEY WERE CLEARLY BUGGY PILES OF CRUD. The revert messages are just things like

This reverts commit <sha1>.

which makes both the original commit _and_ the revert just totally pointless, because we didn't learn anything.

hm, those reverts werent supposed to survive. Again, my bad. I'll clean it out.

Here is how the screwup happened: a series was sent, i applied it, found a test failure with it and reported it:

http://www.uwsg.iu.edu/hypermail/linux/kernel/0809.1/2388.html

but to be able to continue testing i temporarily reverted those bits manually in reverse order, because it took some down to pin down the breakage and these bits got intermixed with other commits - and i did not want to rebase commits that came after the broken series.

Then the corrected v2 series arrived (not a delta fix) and i applied those. The idea was to create a delta patch against the first series so that i can see the changes.

v2 worked well in testing:

http://www.uwsg.iu.edu/hypermail/linux/kernel/0809.1/2375.html

So it's basically a v1 -> v2 sequence, with artificial reverts surviving unintentionally. That's why there were no revert messages either: i never intended them to become public. I even rember having taken a good look at "git diff 6b5b551..6e3e492", which the v1->v2 delta was.

What i havent done was to squash all these artificial commits together and create the delta commit - this is one of the few cases where rebasing of that temporary tail would have been the right thing to do, before pushing it out.

And i should also have noticed this weird sequence of commit logs when doing the pull request.

Sorry :-(

Ingo

#3 lore raw
Quoted 9 lines · Ingo Molnar
Quoted 2 lines

which makes both the original commit _and_ the revert just totally pointless, because we didn't learn anything.

hm, those reverts werent supposed to survive. Again, my bad. I'll clean it out.

Here is how the screwup happened: a series was sent, i applied it, found a test failure with it and reported it:

Quoted 6 lines

http://www.uwsg.iu.edu/hypermail/linux/kernel/0809.1/2388.html

but to be able to continue testing i temporarily reverted those bits manually in reverse order, because it took some down to pin down the breakage and these bits got intermixed with other commits - and i did not want to rebase commits that came after the broken series.

Correction: i did the reverts shortly before applying the v2 series - so it was fully technical. I wanted to do a line by line review of the fix (and did it), because the lockup took quite some time to pin down. To avoid this mistake i could also have hard-reset the full v1 series and could have redone the whole topic.

What's the best Git way to avoid such mishaps? I try to avoid resets and rebases of already pushed out bits as much as possible, because that is both risky because information can be lost and asocial because ongoing work of contributors can be disturbed.

Ingo

#4 lore raw
Quoted 11 lines · Ingo Molnar

Correction: i did the reverts shortly before applying the v2 series - so it was fully technical. I wanted to do a line by line review of the fix (and did it), because the lockup took quite some time to pin down. To avoid this mistake i could also have hard-reset the full v1 series and could have redone the whole topic.

What's the best Git way to avoid such mishaps? I try to avoid resets and rebases of already pushed out bits as much as possible, because that is both risky because information can be lost and asocial because ongoing work of contributors can be disturbed.

There's a couple of things you could have done.

The simplest approach is to kill the branch. Of course, you could do that with just a "git reset", but if you had already pushed the branch out and it wasn't one of the "gets rebased" branches, that's not very nice either.

But rather than doing "git reset" on an old branch, what I think is nicer is to just create a new branch instead, and call it "PAT-v2" or something like that - leaving the old one around, but simply never _using_ it for anything (and obviously not merging it). That seems to match how you work otherwise.

Just opening another branch has the advantage that it also allows you to easily do cross-branch compares. It's actually how I work a lot personally when I work with the git repo and do some new thing: I start a topic branch for it, but it's inevitably going to be ugly in the end because I'm finding problems as I go, so I just start another branch and basically re-create a cleaner version in that.

(I don't end up merging with Junio with git - I just send him patches, so all those branches end up being just private things, but it doesn't change the basic workflow).

And the nice thing with starting a new branch is that you can do your cleanups etc in it, and then things like

git diff broken..new-branch

work fine to check the differences _between_ branches. In other words, this is also a good way to just take a "v2" of a patch-series, and then you basically get a inter-patch-series diff for free that shows what the differences were.

Of cource, once you do that, you can also decide that you're not actually going to use the new branch, you're just going to append the fixes from v2 to the old branch instead. So you may decide that your new branch (that you never pushed out) is not worth making a new branch for, and that it's actually going to be easier for people involved if you just turn the second patch-series into a single (or multiple, for that matter) fix-commit on top of the old patch-series.

Finally, one option that I do not recommend in this case (simply because all of the commits got rewritten) is to actually keep both branches, but do a merge between them and just pick the correct end result in the merge. That can be useful as a way to show both histories, but I'd generally suggest that only if there is some big reason why you'd really want to have both sets of patches around later.

A reason for the last case could be two different approaches that were both valid, and actually ended up both with a very similar end result, and where the way they got to it was interesting and/or relevant exactly because they were different. Or even if they weren't that technically different, maybe they were done by different people, and keeping both ends up showing the real development history _and_ gives credit to both.

There are other ways to do this too, but they all boil down to the "make a new branch that starts at the common point". For example, instead of creating a diff with "git diff broken..fixed" (whether to just see what the breakage was, or to actually fix up the broken branch with), if the series are very similar in structure and in many of the sub-commits, you can end up using "git rebase" to rebase the fixed sequence on top of the broken branch.

That last "git rebase" approach will generally cause a lot of conflicts that you have to fix up by hand (since by definition the two branches will obviously be touching the same area, and in slightly different ways), but sometimes that can actually be exactly what you _want_, since the merge conflicts are going to be exactly the things that changed, and if the series was clean and didn't have lots of patches where one patch in the series changed something that an earlier patch already modified, then the rebase can be a nice way to get the incremental fixes on top of the old broken branch from the fixed one.

So there are certainly different things you can do.

Linus

#5 lore raw
In reply to Ingo Molnar
Quoted 9 lines · Ingo Molnar

v2 worked well in testing:

http://www.uwsg.iu.edu/hypermail/linux/kernel/0809.1/2375.html

So it's basically a v1 -> v2 sequence, with artificial reverts surviving unintentionally. That's why there were no revert messages
either: i never intended them to become public. I even rember having taken a good look at "git diff 6b5b551..6e3e492", which the v1->v2 delta was.

here's the linearized history of the commits (older commits go last):

6e3e492: x86: track memtype for RAM in page struct
09543b6d: x86, cpa: srlz cpa(), global flush tlb after splitting big page and before doing cpa
eaaa6c4: x86, cpa: remove cpa pool code
ef91bf0: x86, cpa: no need to check alias for __set_pages_p/__set_pages_np 8e1701f: x86, cpa: dont use large pages for kernel identity mapping with DEBUG_PAGEALLOC 065ae73: x86, cpa: make the kernel physical mapping initialization a two pass sequence
eb60b73: x86, cpa: remove USER permission from the very early identity mapping attribute
fabf99f: x86, cpa: rename PTE attribute macros for kernel direct mapping in early boot
abfae7f6: Revert "x86, cpa: rename PTE attribute macros for kernel direct mapping in early boot"
f279399: Revert "x86, cpa: remove USER permission from the very early identity mapping attribute" 153eb23: Revert "x86, cpa: make the kernel physical mapping initialization a two pass sequence"
f5c3489: Revert "x86, cpa: dont use large pages for kernel identity mapping with DEBUG_PAGEALLOC"
c613e65: Revert "x86, cpa: fix taking the pgd_lock with interrupts off"
e64b1f1: Revert "x86, cpa: remove cpa pool code"
94448e3: Revert "x86, cpa: global flush tlb after splitting large page and before doing cpa"
aca9b5f: Revert "x86: track memtype for RAM in page struct"
6375b67: Revert "x86: handle error returns in set_memory_*()"
6b5b551: x86: handle error returns in set_memory_*()
5f25f5b: x86: track memtype for RAM in page struct
3196625: x86, cpa: global flush tlb after splitting large page and before doing cpa 79abc89: x86, cpa: remove cpa pool code
e96d59b: x86, cpa: fix taking the pgd_lock with interrupts off
888fdd9: x86, cpa: dont use large pages for kernel identity mapping with DEBUG_PAGEALLOC
e579af6: x86, cpa: make the kernel physical mapping initialization a two pass sequence
c86eefc: x86, cpa: remove USER permission from the very early identity mapping attribute
e8729a5: x86, cpa: rename PTE attribute macros for kernel direct mapping in early boot
f81b691: Merge commit 'v2.6.27-rc6' into x86/pat

e8729a5..6b5b551 was v1, fabf99f..6e3e492 is v2. The reverts in 6375b67..abfae7f6 are a mirror image of v1 and were supposed to be squashed together into a delta commit.

the time gap between v1 and v2 was rather large, 10 days:

CommitDate: Sun Sep 14 17:50:41 2008 +0200
CommitDate: Wed Sep 24 10:07:52 2008 +0200

because it took time to find and track down the lockup, and it also took time to come up with the fix. So i definitely wanted a delta fix (we handle another 150 append-only commits in a 10 day timespan so a delta fix is the right approach), but messed up its generation.

Ingo

#6 lore raw
Quoted 10 lines · Ingo Molnar

the time gap between v1 and v2 was rather large, 10 days:

CommitDate: Sun Sep 14 17:50:41 2008 +0200
CommitDate: Wed Sep 24 10:07:52 2008 +0200

because it took time to find and track down the lockup, and it also took time to come up with the fix. So i definitely wanted a delta fix (we handle another 150 append-only commits in a 10 day timespan so a delta fix is the right approach), but messed up its generation.

So because you wanted a delta fix, and if you want to keep the old series, then yes, creating a new (local-to-your-repository-only, throw-away) branch with the new "v2" series of patches, and then just applying them on top of the old broken series as incremental fixes would probably be the right thing to do.

With the reverts, there's not only all that useless noise in the logs, the problem is that all that extra crud is actually _hiding_ what the real fix was. So instead of seeing the fix, we just see a revert and a totally new version. That's pretty pessimal - the whole sequence isn't bisectable anyway.

So what I suggest are good alternatives would be:

- Make things bisectable by just using a totally new branch (and dropping the old branch). This just throws out the buggy version, since it never gets merged upstream, and as such nobody will ever really care what the bug was.

This obviously depends on _others_ not having based their work on the broken crud.

- Make nice incremental fix patches, rather than "revert and redo". This isn't bisectable, but on the other hand it can certainly be educational, and "git blame" etc will give reasonable results, and people seeing the history can at least see what the bug was.

I tried to outline a couple of ways to have git help you do the second version in the previous email. It's still going to be somewhat manual, but especially if the difference between patch-series wasn't _that_ big, a simple sequence of

git checkout broken
git diff broken..fixed | git apply
.. see how you want to commit the fix - maybe as one thing, maybe
as a series of independent fixes depending on the size of it ..

will get you there with fairly little pain.

Of course, if the branch had other commits to it than just the broken series, you will need to cherry-pick those other commits to the "fixed" branch too, so that the difference between broken and fixed is literally just the difference between the two patch-series.

Hmm?

Linus

#7 lore raw
In reply to Ingo Molnar

in other words, this linear commit range:

abfae7f6: Revert "x86, cpa: rename PTE attribute macros for kernel direct mapping in early boot"
f279399: Revert "x86, cpa: remove USER permission from the very early identity mapping attribute" 153eb23: Revert "x86, cpa: make the kernel physical mapping initialization a two pass sequence"
f5c3489: Revert "x86, cpa: dont use large pages for kernel identity mapping with DEBUG_PAGEALLOC"
c613e65: Revert "x86, cpa: fix taking the pgd_lock with interrupts off"
e64b1f1: Revert "x86, cpa: remove cpa pool code"
94448e3: Revert "x86, cpa: global flush tlb after splitting large page and before doing cpa"
aca9b5f: Revert "x86: track memtype for RAM in page struct"
6375b67: Revert "x86: handle error returns in set_memory_*()"
6b5b551: x86: handle error returns in set_memory_*()
5f25f5b: x86: track memtype for RAM in page struct
3196625: x86, cpa: global flush tlb after splitting large page and before doing cpa 79abc89: x86, cpa: remove cpa pool code
e96d59b: x86, cpa: fix taking the pgd_lock with interrupts off
888fdd9: x86, cpa: dont use large pages for kernel identity mapping with DEBUG_PAGEALLOC
e579af6: x86, cpa: make the kernel physical mapping initialization a two pass sequence
c86eefc: x86, cpa: remove USER permission from the very early identity mapping attribute
e8729a5: x86, cpa: rename PTE attribute macros for kernel direct mapping in early boot

is a NOP, "git diff f81b691..abfae7f6" comes up empty. So it carries nothing other than the information that this series was broken. (and even that is not very apparent)

So ... i've created a new branch, tip/x86/pat2 for the cleaned up history and we'll retire the contents of tip/x86/pat later on once we are sure it has no value. (other than for it to be a permanent embarrassment for me, which i'm totally fine with to destroy)

i merged your latest tree to tip/x86/pat and compared that to pat2, and the difference is zero:

earth4:~/tip> git diff x86/pat x86/pat2
earth4:~/tip>

which is the expected result.

i'll re-roll the seven x86-v28-for-linus-phase3...phase10 trees as well.

Find below the updated pull request.

Another question i was thinking about: the x86-v28-for-linus-phase2-B kind of branch names sound a bit artificial to pull. But i definitely needed them to be cleanly enumerated to be able to test through every step (we did serious boot testing of every phase) and to be able to keep track of everything.

Ingo

-------------->
Linus,

Please pull the latest x86-v28-for-linus-phase2-B git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git x86-v28-for-linus-phase2-B

out-of-topic modifications in x86-v28-for-linus-phase2-B:
---------------------------------------------------------
drivers/char/agp/agp.h # bd07928: agp: add agp_generic_destroy_page
# 37acee1: agp: generic_alloc_pages() # 9326d61: Revert "reduce tlb/cache flush ti # 466ae83: reduce tlb/cache flush times of a

drivers/char/agp/alpha-agp.c       # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/amd-k7-agp.c      # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/amd64-agp.c       # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/ati-agp.c         # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/efficeon-agp.c    # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/generic.c         # bd07928: agp: add agp_generic_destroy_page
                                   # 37acee1: agp: generic_alloc_pages()
                                   # 9326d61: Revert "reduce tlb/cache flush ti
                                   # 466ae83: reduce tlb/cache flush times of a
drivers/char/agp/hp-agp.c          # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/i460-agp.c        # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/intel-agp.c       # bd07928: agp: add agp_generic_destroy_page
                                   # 37acee1: agp: generic_alloc_pages()
drivers/char/agp/nvidia-agp.c      # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/parisc-agp.c      # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/sis-agp.c         # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/sworks-agp.c      # 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/uninorth-agp.c    # c09ff7e: linux-next: fix x86 tree build fa

# 5f310b6: agp: enable optimized agp_alloc_p
drivers/char/agp/via-agp.c # 5f310b6: agp: enable optimized agp_alloc_p
mm/highmem.c # 5843d9a: x86, pat: avoid highmem cache att

Thanks,

Ingo

------------------>
Andreas Herrmann (1):
x86: compile pat debugfs interface only if CONFIG_X86_PAT is set

Ingo Molnar (3):
Revert "reduce tlb/cache flush times of agpgart memory allocation" Revert "introduce two APIs for page attribute"
x86, pat: cleanups

Jeremy Fitzhardinge (1):
x86: make sure the CPA test code's use of _PAGE_UNUSED1 is obvious

Nick Piggin (1):
x86, pat: avoid highmem cache attribute aliasing

Rene Herman (3):
x86: {reverve,free}_memtype() take a physical address
x86: have set_memory_array_{uc,wb} coalesce memtypes.
agp: enable optimized agp_alloc_pages methods

Shaohua Li (6):
introduce two APIs for page attribute
reduce tlb/cache flush times of agpgart memory allocation x86, pageattr: introduce APIs to change pageattr of a page array
agp: generic_alloc_pages()
agp: add agp_generic_destroy_pages()
x86: fix pageattr-test

Stephen Rothwell (1):
linux-next: fix x86 tree build failure

Suresh Siddha (10):
x86, cpa: rename PTE attribute macros for kernel direct mapping in early boot x86, cpa: remove USER permission from the very early identity mapping attribute x86, cpa: make the kernel physical mapping initialization a two pass sequence x86, cpa: dont use large pages for kernel identity mapping with DEBUG_PAGEALLOC x86, cpa: no need to check alias for __set_pages_p/__set_pages_np x86, cpa: remove cpa pool code
x86, cpa: srlz cpa(), global flush tlb after splitting big page and before doing cpa
x86: track memtype for RAM in page struct
x86: fix pagetable init 64-bit breakage
x86, cpa: make the kernel physical mapping initialization a two pass sequence, fix

Venki Pallipadi (1):
x86: have set_memory_array_{uc,wb} coalesce memtypes, fix

 arch/x86/kernel/head_32.S       |   34 ++--
 arch/x86/kernel/head_64.S       |    4 +-
 arch/x86/mm/init_32.c           |   84 +++++++-
 arch/x86/mm/init_64.c           |  110 +++++++---
 arch/x86/mm/ioremap.c           |   19 ++
 arch/x86/mm/pageattr-test.c     |    9 +-
 arch/x86/mm/pageattr.c          |  459 +++++++++++++++++++++------------------
 arch/x86/mm/pat.c               |  132 +++++++++---
 drivers/char/agp/agp.h          |    5 +
 drivers/char/agp/alpha-agp.c    |    2 +
 drivers/char/agp/amd-k7-agp.c   |    2 +
 drivers/char/agp/amd64-agp.c    |    2 +
 drivers/char/agp/ati-agp.c      |    2 +
 drivers/char/agp/efficeon-agp.c |    2 +
 drivers/char/agp/generic.c      |   97 ++++++++-
 drivers/char/agp/hp-agp.c       |    2 +
 drivers/char/agp/i460-agp.c     |    2 +
 drivers/char/agp/intel-agp.c    |   28 +++
 drivers/char/agp/nvidia-agp.c   |    2 +
 drivers/char/agp/parisc-agp.c   |    2 +
 drivers/char/agp/sis-agp.c      |    2 +
 drivers/char/agp/sworks-agp.c   |    2 +
 drivers/char/agp/uninorth-agp.c |    4 +
 drivers/char/agp/via-agp.c      |    4 +
 include/asm-x86/cacheflush.h    |    7 +-
 include/asm-x86/page.h          |    1 +
 include/asm-x86/pgtable.h       |   13 +
 mm/highmem.c                    |    5 +-
 28 files changed, 730 insertions(+), 307 deletions(-)
arch/x86/kernel/head_32.S +15 -19
index a7010c3..e835b4e 100644
@@ -172,10 +172,6 @@ num_subarch_entries = (. - subarch_entries) / 4
  *
  * Note that the stack is not yet set up!
  */
-#define PTE_ATTR	0x007		/* PRESENT+RW+USER */
-#define PDE_ATTR	0x067		/* PRESENT+RW+USER+DIRTY+ACCESSED */
-#define PGD_ATTR	0x001		/* PRESENT (no other attributes) */
-
 default_entry:
 #ifdef CONFIG_X86_PAE
 
@@ -196,9 +192,9 @@ default_entry:
 	movl $pa(pg0), %edi
 	movl %edi, pa(init_pg_tables_start)
 	movl $pa(swapper_pg_pmd), %edx
-	movl $PTE_ATTR, %eax
+	movl $PTE_IDENT_ATTR, %eax
 10:
-	leal PDE_ATTR(%edi),%ecx		/* Create PMD entry */
+	leal PDE_IDENT_ATTR(%edi),%ecx		/* Create PMD entry */
 	movl %ecx,(%edx)			/* Store PMD entry */
 						/* Upper half already zero */
 	addl $8,%edx
@@ -215,7 +211,7 @@ default_entry:
 	 * End condition: we must map up to and including INIT_MAP_BEYOND_END
 	 * bytes beyond the end of our own page tables.
 	 */
-	leal (INIT_MAP_BEYOND_END+PTE_ATTR)(%edi),%ebp
+	leal (INIT_MAP_BEYOND_END+PTE_IDENT_ATTR)(%edi),%ebp
 	cmpl %ebp,%eax
 	jb 10b
 1:
@@ -224,7 +220,7 @@ default_entry:
 	movl %eax, pa(max_pfn_mapped)
 
 	/* Do early initialization of the fixmap area */
-	movl $pa(swapper_pg_fixmap)+PDE_ATTR,%eax
+	movl $pa(swapper_pg_fixmap)+PDE_IDENT_ATTR,%eax
 	movl %eax,pa(swapper_pg_pmd+0x1000*KPMDS-8)
 #else	/* Not PAE */
 
@@ -233,9 +229,9 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
 	movl $pa(pg0), %edi
 	movl %edi, pa(init_pg_tables_start)
 	movl $pa(swapper_pg_dir), %edx
-	movl $PTE_ATTR, %eax
+	movl $PTE_IDENT_ATTR, %eax
 10:
-	leal PDE_ATTR(%edi),%ecx		/* Create PDE entry */
+	leal PDE_IDENT_ATTR(%edi),%ecx		/* Create PDE entry */
 	movl %ecx,(%edx)			/* Store identity PDE entry */
 	movl %ecx,page_pde_offset(%edx)		/* Store kernel PDE entry */
 	addl $4,%edx
@@ -249,7 +245,7 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
 	 * bytes beyond the end of our own page tables; the +0x007 is
 	 * the attribute bits
 	 */
-	leal (INIT_MAP_BEYOND_END+PTE_ATTR)(%edi),%ebp
+	leal (INIT_MAP_BEYOND_END+PTE_IDENT_ATTR)(%edi),%ebp
 	cmpl %ebp,%eax
 	jb 10b
 	movl %edi,pa(init_pg_tables_end)
@@ -257,7 +253,7 @@ page_pde_offset = (__PAGE_OFFSET >> 20);
 	movl %eax, pa(max_pfn_mapped)
 
 	/* Do early initialization of the fixmap area */
-	movl $pa(swapper_pg_fixmap)+PDE_ATTR,%eax
+	movl $pa(swapper_pg_fixmap)+PDE_IDENT_ATTR,%eax
 	movl %eax,pa(swapper_pg_dir+0xffc)
 #endif
 	jmp 3f
@@ -634,19 +630,19 @@ ENTRY(empty_zero_page)
 	/* Page-aligned for the benefit of paravirt? */
 	.align PAGE_SIZE_asm
 ENTRY(swapper_pg_dir)
-	.long	pa(swapper_pg_pmd+PGD_ATTR),0		/* low identity map */
+	.long	pa(swapper_pg_pmd+PGD_IDENT_ATTR),0	/* low identity map */
 # if KPMDS == 3
-	.long	pa(swapper_pg_pmd+PGD_ATTR),0
-	.long	pa(swapper_pg_pmd+PGD_ATTR+0x1000),0
-	.long	pa(swapper_pg_pmd+PGD_ATTR+0x2000),0
+	.long	pa(swapper_pg_pmd+PGD_IDENT_ATTR),0
+	.long	pa(swapper_pg_pmd+PGD_IDENT_ATTR+0x1000),0
+	.long	pa(swapper_pg_pmd+PGD_IDENT_ATTR+0x2000),0
 # elif KPMDS == 2
 	.long	0,0
-	.long	pa(swapper_pg_pmd+PGD_ATTR),0
-	.long	pa(swapper_pg_pmd+PGD_ATTR+0x1000),0
+	.long	pa(swapper_pg_pmd+PGD_IDENT_ATTR),0
+	.long	pa(swapper_pg_pmd+PGD_IDENT_ATTR+0x1000),0
 # elif KPMDS == 1
 	.long	0,0
 	.long	0,0
-	.long	pa(swapper_pg_pmd+PGD_ATTR),0
+	.long	pa(swapper_pg_pmd+PGD_IDENT_ATTR),0
 # else
 #  error "Kernel PMDs should be 1, 2 or 3"
 # endif
arch/x86/kernel/head_64.S +2 -2
index db3280a..26cfdc1 100644
@@ -110,7 +110,7 @@ startup_64:
 	movq	%rdi, %rax
 	shrq	$PMD_SHIFT, %rax
 	andq	$(PTRS_PER_PMD - 1), %rax
-	leaq	__PAGE_KERNEL_LARGE_EXEC(%rdi), %rdx
+	leaq	__PAGE_KERNEL_IDENT_LARGE_EXEC(%rdi), %rdx
 	leaq	level2_spare_pgt(%rip), %rbx
 	movq	%rdx, 0(%rbx, %rax, 8)
 ident_complete:
@@ -374,7 +374,7 @@ NEXT_PAGE(level2_ident_pgt)
 	/* Since I easily can, map the first 1G.
 	 * Don't set NX because code runs from these pages.
 	 */
-	PMDS(0, __PAGE_KERNEL_LARGE_EXEC, PTRS_PER_PMD)
+	PMDS(0, __PAGE_KERNEL_IDENT_LARGE_EXEC, PTRS_PER_PMD)
 
 NEXT_PAGE(level2_kernel_pgt)
 	/*
arch/x86/mm/init_32.c +74 -10

155 lines not on this page · raw message

arch/x86/mm/init_64.c +82 -28

255 lines not on this page · raw message

arch/x86/mm/ioremap.c +19 -0
index cac6da5..6ab3196 100644
@@ -83,6 +83,25 @@ int page_is_ram(unsigned long pagenr)
 	return 0;
 }
 
+int pagerange_is_ram(unsigned long start, unsigned long end)
+{
+	int ram_page = 0, not_rampage = 0;
+	unsigned long page_nr;
+
+	for (page_nr = (start >> PAGE_SHIFT); page_nr < (end >> PAGE_SHIFT);
+	     ++page_nr) {
+		if (page_is_ram(page_nr))
+			ram_page = 1;
+		else
+			not_rampage = 1;
+
+		if (ram_page == not_rampage)
+			return -1;
+	}
+
+	return ram_page;
+}
+
 /*
  * Fix up the linear direct mapping of the kernel to avoid cache attribute
  * conflicts.
arch/x86/mm/pageattr-test.c +6 -3
index d4aa503..e1d1069 100644
@@ -32,7 +32,7 @@ enum {
 	GPS			= (1<<30)
 };
 
-#define PAGE_TESTBIT	__pgprot(_PAGE_UNUSED1)
+#define PAGE_CPA_TEST	__pgprot(_PAGE_CPA_TEST)
 
 static int pte_testbit(pte_t pte)
 {
@@ -118,6 +118,7 @@ static int pageattr_test(void)
 	unsigned int level;
 	int i, k;
 	int err;
+	unsigned long test_addr;
 
 	if (print)
 		printk(KERN_INFO "CPA self-test:\n");
@@ -172,7 +173,8 @@ static int pageattr_test(void)
 			continue;
 		}
 
-		err = change_page_attr_set(addr[i], len[i], PAGE_TESTBIT);
+		test_addr = addr[i];
+		err = change_page_attr_set(&test_addr, len[i], PAGE_CPA_TEST, 0);
 		if (err < 0) {
 			printk(KERN_ERR "CPA %d failed %d\n", i, err);
 			failed++;
@@ -204,7 +206,8 @@ static int pageattr_test(void)
 			failed++;
 			continue;
 		}
-		err = change_page_attr_clear(addr[i], len[i], PAGE_TESTBIT);
+		test_addr = addr[i];
+		err = change_page_attr_clear(&test_addr, len[i], PAGE_CPA_TEST, 0);
 		if (err < 0) {
 			printk(KERN_ERR "CPA reverting failed: %d\n", err);
 			failed++;
arch/x86/mm/pageattr.c +251 -208

701 lines not on this page · raw message

arch/x86/mm/pat.c +106 -26

251 lines not on this page · raw message

drivers/char/agp/agp.h +5 -0
index 4bada0e..46f5075 100644
@@ -116,7 +116,9 @@ struct agp_bridge_driver {
 	struct agp_memory *(*alloc_by_type) (size_t, int);
 	void (*free_by_type)(struct agp_memory *);
 	void *(*agp_alloc_page)(struct agp_bridge_data *);
+	int (*agp_alloc_pages)(struct agp_bridge_data *, struct agp_memory *, size_t);
 	void (*agp_destroy_page)(void *, int flags);
+	void (*agp_destroy_pages)(struct agp_memory *);
 	int (*agp_type_to_mask_type) (struct agp_bridge_data *, int);
 	void (*chipset_flush)(struct agp_bridge_data *);
 };
@@ -277,7 +279,10 @@ int agp_generic_remove_memory(struct agp_memory *mem, off_t pg_start, int type);
 struct agp_memory *agp_generic_alloc_by_type(size_t page_count, int type);
 void agp_generic_free_by_type(struct agp_memory *curr);
 void *agp_generic_alloc_page(struct agp_bridge_data *bridge);
+int agp_generic_alloc_pages(struct agp_bridge_data *agp_bridge,
+			    struct agp_memory *memory, size_t page_count);
 void agp_generic_destroy_page(void *addr, int flags);
+void agp_generic_destroy_pages(struct agp_memory *memory);
 void agp_free_key(int key);
 int agp_num_entries(void);
 u32 agp_collect_device_status(struct agp_bridge_data *bridge, u32 mode, u32 command);
drivers/char/agp/alpha-agp.c +2 -0
index 5da89f6..5ea4da8 100644
@@ -143,7 +143,9 @@ struct agp_bridge_driver alpha_core_agp_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
drivers/char/agp/amd-k7-agp.c +2 -0
index e280531..603a986 100644
@@ -386,7 +386,9 @@ static const struct agp_bridge_driver amd_irongate_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
drivers/char/agp/amd64-agp.c +2 -0
index 7495c52..2812ee2 100644
@@ -224,7 +224,9 @@ static const struct agp_bridge_driver amd_8151_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
drivers/char/agp/ati-agp.c +2 -0
index 6ecbcaf..ae2791b 100644
@@ -418,7 +418,9 @@ static const struct agp_bridge_driver ati_generic_bridge = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
drivers/char/agp/efficeon-agp.c +2 -0
index 8ca6f26..453543a 100644
@@ -335,7 +335,9 @@ static const struct agp_bridge_driver efficeon_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
drivers/char/agp/generic.c +89 -8

121 lines not on this page · raw message

drivers/char/agp/hp-agp.c +2 -0
index 80d7317..183ac3f 100644
@@ -435,7 +435,9 @@ const struct agp_bridge_driver hp_zx1_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 	.cant_use_aperture	= true,
 };
drivers/char/agp/i460-agp.c +2 -0
index e587eeb..10da687 100644
@@ -575,7 +575,9 @@ const struct agp_bridge_driver intel_i460_driver = {
 	.insert_memory		= i460_insert_memory_small_io_page,
 	.remove_memory		= i460_remove_memory_small_io_page,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 #endif
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
drivers/char/agp/intel-agp.c +28 -0
index 016fdf0..043e366 100644
@@ -1711,7 +1711,9 @@ static const struct agp_bridge_driver intel_generic_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
@@ -1736,7 +1738,9 @@ static const struct agp_bridge_driver intel_810_driver = {
 	.alloc_by_type		= intel_i810_alloc_by_type,
 	.free_by_type		= intel_i810_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
@@ -1760,7 +1764,9 @@ static const struct agp_bridge_driver intel_815_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type	= agp_generic_type_to_mask_type,
 };
 
@@ -1785,7 +1791,9 @@ static const struct agp_bridge_driver intel_830_driver = {
 	.alloc_by_type		= intel_i830_alloc_by_type,
 	.free_by_type		= intel_i810_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = intel_i830_type_to_mask_type,
 	.chipset_flush		= intel_i830_chipset_flush,
 };
@@ -1810,7 +1818,9 @@ static const struct agp_bridge_driver intel_820_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
@@ -1834,7 +1844,9 @@ static const struct agp_bridge_driver intel_830mp_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
@@ -1858,7 +1870,9 @@ static const struct agp_bridge_driver intel_840_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
@@ -1882,7 +1896,9 @@ static const struct agp_bridge_driver intel_845_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 	.chipset_flush		= intel_i830_chipset_flush,
 };
@@ -1907,7 +1923,9 @@ static const struct agp_bridge_driver intel_850_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
@@ -1931,7 +1949,9 @@ static const struct agp_bridge_driver intel_860_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
@@ -1956,7 +1976,9 @@ static const struct agp_bridge_driver intel_915_driver = {
 	.alloc_by_type		= intel_i830_alloc_by_type,
 	.free_by_type		= intel_i810_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = intel_i830_type_to_mask_type,
 	.chipset_flush		= intel_i915_chipset_flush,
 };
@@ -1982,7 +2004,9 @@ static const struct agp_bridge_driver intel_i965_driver = {
 	.alloc_by_type		= intel_i830_alloc_by_type,
 	.free_by_type		= intel_i810_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type	= intel_i830_type_to_mask_type,
 	.chipset_flush		= intel_i915_chipset_flush,
 };
@@ -2007,7 +2031,9 @@ static const struct agp_bridge_driver intel_7505_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
@@ -2032,7 +2058,9 @@ static const struct agp_bridge_driver intel_g33_driver = {
 	.alloc_by_type		= intel_i830_alloc_by_type,
 	.free_by_type		= intel_i810_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages        = agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages      = agp_generic_destroy_pages,
 	.agp_type_to_mask_type	= intel_i830_type_to_mask_type,
 	.chipset_flush		= intel_i915_chipset_flush,
 };
drivers/char/agp/nvidia-agp.c +2 -0
index eaceb61..dc70d37 100644
@@ -312,7 +312,9 @@ static const struct agp_bridge_driver nvidia_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
drivers/char/agp/parisc-agp.c +2 -0
index 8c42dcc..f2492ec 100644
@@ -224,7 +224,9 @@ static const struct agp_bridge_driver parisc_agp_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 	.cant_use_aperture	= true,
 };
drivers/char/agp/sis-agp.c +2 -0
index 2587ef9..6c3837a 100644
@@ -140,7 +140,9 @@ static struct agp_bridge_driver sis_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
drivers/char/agp/sworks-agp.c +2 -0
index 2fb27fe..6224df8 100644
@@ -437,7 +437,9 @@ static const struct agp_bridge_driver sworks_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
drivers/char/agp/uninorth-agp.c +4 -0
index eef7270..0f004b6 100644
@@ -509,7 +509,9 @@ const struct agp_bridge_driver uninorth_agp_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 	.cant_use_aperture	= true,
 };
@@ -534,7 +536,9 @@ const struct agp_bridge_driver u3_agp_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 	.cant_use_aperture	= true,
 	.needs_scratch_page	= true,
drivers/char/agp/via-agp.c +4 -0
index 7b36476..9f4d49e 100644
@@ -190,7 +190,9 @@ static const struct agp_bridge_driver via_agp3_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
@@ -214,7 +216,9 @@ static const struct agp_bridge_driver via_driver = {
 	.alloc_by_type		= agp_generic_alloc_by_type,
 	.free_by_type		= agp_generic_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
+	.agp_alloc_pages	= agp_generic_alloc_pages,
 	.agp_destroy_page	= agp_generic_destroy_page,
+	.agp_destroy_pages	= agp_generic_destroy_pages,
 	.agp_type_to_mask_type  = agp_generic_type_to_mask_type,
 };
 
include/asm-x86/cacheflush.h +5 -2
index 59859cb..68840ef 100644
@@ -24,6 +24,8 @@
 #define copy_from_user_page(vma, page, vaddr, dst, src, len)	\
 	memcpy((dst), (src), (len))
 
+#define PG_non_WB				PG_arch_1
+PAGEFLAG(NonWB, non_WB)
 
 /*
  * The set_memory_* API can be used to change various attributes of a virtual
@@ -66,6 +68,9 @@ int set_memory_rw(unsigned long addr, int numpages);
 int set_memory_np(unsigned long addr, int numpages);
 int set_memory_4k(unsigned long addr, int numpages);
 
+int set_memory_array_uc(unsigned long *addr, int addrinarray);
+int set_memory_array_wb(unsigned long *addr, int addrinarray);
+
 /*
  * For legacy compatibility with the old APIs, a few functions
  * are provided that work on a "struct page".
@@ -96,8 +101,6 @@ int set_pages_rw(struct page *page, int numpages);
 
 void clflush_cache_range(void *addr, unsigned int size);
 
-void cpa_init(void);
-
 #ifdef CONFIG_DEBUG_RODATA
 void mark_rodata_ro(void);
 extern const int rodata_test_data;
include/asm-x86/page.h +1 -0
index 79544e6..c915747 100644
@@ -57,6 +57,7 @@ typedef struct { pgdval_t pgd; } pgd_t;
 typedef struct { pgprotval_t pgprot; } pgprot_t;
 
 extern int page_is_ram(unsigned long pagenr);
+extern int pagerange_is_ram(unsigned long start, unsigned long end);
 extern int devmem_is_allowed(unsigned long pagenr);
 extern void map_devmem(unsigned long pfn, unsigned long size,
 		       pgprot_t vma_prot);
include/asm-x86/pgtable.h +13 -0
index 888add7..ed93245 100644
@@ -19,6 +19,7 @@
 #define _PAGE_BIT_UNUSED3	11
 #define _PAGE_BIT_PAT_LARGE	12	/* On 2MB or 1GB pages */
 #define _PAGE_BIT_SPECIAL	_PAGE_BIT_UNUSED1
+#define _PAGE_BIT_CPA_TEST	_PAGE_BIT_UNUSED1
 #define _PAGE_BIT_NX           63       /* No execute: only valid after cpuid check */
 
 #define _PAGE_PRESENT	(_AT(pteval_t, 1) << _PAGE_BIT_PRESENT)
@@ -36,6 +37,7 @@
 #define _PAGE_PAT	(_AT(pteval_t, 1) << _PAGE_BIT_PAT)
 #define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE)
 #define _PAGE_SPECIAL	(_AT(pteval_t, 1) << _PAGE_BIT_SPECIAL)
+#define _PAGE_CPA_TEST	(_AT(pteval_t, 1) << _PAGE_BIT_CPA_TEST)
 #define __HAVE_ARCH_PTE_SPECIAL
 
 #if defined(CONFIG_X86_64) || defined(CONFIG_X86_PAE)
@@ -130,6 +132,17 @@
 #define __S110	PAGE_SHARED_EXEC
 #define __S111	PAGE_SHARED_EXEC
 
+/*
+ * early identity mapping  pte attrib macros.
+ */
+#ifdef CONFIG_X86_64
+#define __PAGE_KERNEL_IDENT_LARGE_EXEC	__PAGE_KERNEL_LARGE_EXEC
+#else
+#define PTE_IDENT_ATTR	 0x003		/* PRESENT+RW */
+#define PDE_IDENT_ATTR	 0x063		/* PRESENT+RW+DIRTY+ACCESSED */
+#define PGD_IDENT_ATTR	 0x001		/* PRESENT (no other attributes) */
+#endif
+
 #ifndef __ASSEMBLY__
 
 /*
mm/highmem.c +4 -1
index e16e152..b36b83b 100644
@@ -70,6 +70,7 @@ static DECLARE_WAIT_QUEUE_HEAD(pkmap_map_wait);
 static void flush_all_zero_pkmaps(void)
 {
 	int i;
+	int need_flush = 0;
 
 	flush_cache_kmaps();
 
@@ -101,8 +102,10 @@ static void flush_all_zero_pkmaps(void)
 			  &pkmap_page_table[i]);
 
 		set_page_address(page, NULL);
+		need_flush = 1;
 	}
-	flush_tlb_kernel_range(PKMAP_ADDR(0), PKMAP_ADDR(LAST_PKMAP));
+	if (need_flush)
+		flush_tlb_kernel_range(PKMAP_ADDR(0), PKMAP_ADDR(LAST_PKMAP));
 }
 
 /**
#8 lore raw
Quoted 2 lines · Ingo Molnar

i'll re-roll the seven x86-v28-for-linus-phase3...phase10 trees as well.

Just checking: the scheduler/rcu trees you did pull requests for yesterday are all independent and I can pull those as-is, right?

Linus

#9 lore raw
Quoted 6 lines · Linus Torvalds
Quoted 2 lines · Ingo Molnar

i'll re-roll the seven x86-v28-for-linus-phase3...phase10 trees as well.

Just checking: the scheduler/rcu trees you did pull requests for yesterday are all independent and I can pull those as-is, right?

Correct, scheduler, RCU and fastboot are all independent. To make sure i just checked the merging aspects of all of them:

sched-v28-for-linus: OK

2c10c22: Merge branch 'linus' into sched/devel
63e5c39: Merge branches 'sched/urgent' and 'sched/rt' into sched/devel 09b22a2: Merge commit 'v2.6.27-rc6' into sched/devel 7f79d85: Merge branch 'linus' into sched/devel
3cf430b: Merge branch 'linus' into sched/devel

rcu-v28-for-linus: OK

cdbb92b: Merge branch 'linus' into core/rcu
b5259d9: Merge commit 'v2.6.27-rc8' into core/rcu 429b022: Merge commit 'v2.6.27-rc6' into core/rcu
c4c0c56: Merge branch 'linus' into core/rcu

fastboot-v28-for-linus: OK

1562542: Merge branch 'linus' into fastboot 3588ed2: Merge branch 'linus' into fastboot
f793691: Merge commit 'v2.6.27-rc6' into fastboot
b676303: Merge branch 'linus' into fastboot
bf015f7: Merge branch 'linus' into fastboot

the x86-v28-phase*-linus branches were all interdependent but are easy to re-propagate because all the x86 topics are -git based and while they merged the old x86/pat, they merged it before it grew that ugliness.

(and the pat2 rebase did not touch the old commits that were fine)

So it should be fine. I'm also doing rolling tests of the new branches.

In general, this is where the "extreme topical" setup rocks IMO: had this mishap happened in a linear tree i'd have had to rebase about 300 followup commits to get rid of it - that would have been quite a mess to validate. But with the topical setup it was at the end of x86/pat and only a single followup commit had to be rebased.

And bisectability bugs easily slip into extreme rebasing excercises:
crossing merges cause conflicts and manual steps that are easy to mess up. I had to do such a rebase once a couple of months ago and it was very stressful and very hard to get it right.

... we are not totally immune to it though, because sometimes we still do cross-merges between topics when the conflicts just get too ugly.

So this was pretty much close to a worst-case scenario: phase2 was unacceptable due to this really stupid v1->v2 series and i had to redo the whole followup integration - but still i did not have to do _one single_ manual step in the code space itself (only on branches), so while there are new-looking merge commits with conflicts, they are all cached git-rerere entries and thus the testing status should still all be valid.

btw., that might be a Git feature request: it would be _really_ nice if instead of:

Merge branch 'linus' into x86/pat2

Conflicts:
arch/x86/mm/init_64.c

git-rerere facilities created this default commit message automatically:

Merge branch 'linus' into x86/pat2

Conflicts:
arch/x86/mm/init_64.c, cached 14 days ago

that way it's a lot easier to judge and trust the quality of recent merge commits. (and reduce/manage risks associated with merge mistakes)

Ingo

#10 lore raw
In reply to Ingo Molnar
Quoted 7 lines · Ingo Molnar

i merged your latest tree to tip/x86/pat and compared that to pat2, and the difference is zero:

earth4:~/tip> git diff x86/pat x86/pat2
earth4:~/tip>

which is the expected result.

Note: one detail i just noticed, x86/pat grew a new commit today, to fix a bug that affected Xen:

b27a43c: x86, cpa: make the kernel physical mapping initialization a two pass se

this is in pat2 (and hence included in the pull request as well), but was not included in my first phase2 pull request ~17 hours ago.

So if you diffed old phase2 against new phase2 that commit might stick out as a weird delta.

Ingo