[kernel] r11917 - in dists/trunk/linux-2.6/debian/patches: bugfix/m68k/2.6.26 series
Stephen Marenka
smarenka at alioth.debian.org
Tue Jul 29 17:32:37 UTC 2008
Author: smarenka
Date: Tue Jul 29 17:32:33 2008
New Revision: 11917
Log:
m68k: update patches
Added:
dists/trunk/linux-2.6/debian/patches/bugfix/m68k/2.6.26/dio-use-dio_match_device.diff
dists/trunk/linux-2.6/debian/patches/bugfix/m68k/2.6.26/m68k-atari-stram.diff
Modified:
dists/trunk/linux-2.6/debian/patches/series/1~experimental.1-extra
Added: dists/trunk/linux-2.6/debian/patches/bugfix/m68k/2.6.26/dio-use-dio_match_device.diff
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/m68k/2.6.26/dio-use-dio_match_device.diff Tue Jul 29 17:32:33 2008
@@ -0,0 +1,35 @@
+Subject: [PATCH] dio: use dio_match_device() in dio_bus_match()
+
+From: Akinobu Mita <akinobu.mita at gmail.com>
+
+dio_bus_match() can use dio_match_device().
+
+Signed-off-by: Akinobu Mita <akinobu.mita at gmail.com>
+Signed-off-by: Geert Uytterhoeven <geert at linux-m68k.org>
+---
+ drivers/dio/dio-driver.c | 14 +-------------
+ 1 file changed, 1 insertion(+), 13 deletions(-)
+
+--- a/drivers/dio/dio-driver.c
++++ b/drivers/dio/dio-driver.c
+@@ -119,19 +119,7 @@ static int dio_bus_match(struct device *
+ if (!ids)
+ return 0;
+
+- while (ids->id) {
+- if (ids->id == DIO_WILDCARD)
+- return 1;
+- if (DIO_NEEDSSECID(ids->id & 0xff)) {
+- if (ids->id == d->id)
+- return 1;
+- } else {
+- if ((ids->id & 0xff) == (d->id & 0xff))
+- return 1;
+- }
+- ids++;
+- }
+- return 0;
++ return dio_match_device(ids, d) ? 1 : 0;
+ }
+
+
Added: dists/trunk/linux-2.6/debian/patches/bugfix/m68k/2.6.26/m68k-atari-stram.diff
==============================================================================
--- (empty file)
+++ dists/trunk/linux-2.6/debian/patches/bugfix/m68k/2.6.26/m68k-atari-stram.diff Tue Jul 29 17:32:33 2008
@@ -0,0 +1,99 @@
+diff -ru a/arch/m68k/atari/stram.c b/arch/m68k/atari/stram.c
+--- a/arch/m68k/atari/stram.c 2008-07-13 16:51:29.000000000 -0500
++++ b/arch/m68k/atari/stram.c 2008-07-29 09:29:04.000000000 -0500
+@@ -30,7 +30,7 @@
+ #include <asm/atari_stram.h>
+ #include <asm/io.h>
+
+-#undef DEBUG
++#define DEBUG
+
+ #ifdef DEBUG
+ #define DPRINTK(fmt,args...) printk( fmt, ##args )
+@@ -90,11 +90,15 @@
+ /* values for flags field */
+ #define BLOCK_FREE 0x01 /* free structure in the BLOCKs pool */
+ #define BLOCK_KMALLOCED 0x02 /* structure allocated by kmalloc() */
++#define BLOCK_POOL 0x04 /* block allocated from static pool */
+ #define BLOCK_GFP 0x08 /* block allocated with __get_dma_pages() */
+
+ /* list of allocated blocks */
+ static BLOCK *alloc_list;
+
++static BLOCK *stram_free_list;
++static unsigned long stram_pool, stram_pool_start, stram_pool_end;
++
+ /* We can't always use kmalloc() to allocate BLOCK structures, since
+ * stram_alloc() can be called rather early. So we need some pool of
+ * statically allocated structures. 20 of them is more than enough, so in most
+@@ -155,6 +159,10 @@
+ if (!kernel_in_stram)
+ reserve_bootmem(0, PAGE_SIZE, BOOTMEM_DEFAULT);
+
++ stram_pool = (unsigned long) alloc_bootmem_low(512*1024);
++ stram_pool_start = stram_pool;
++ stram_pool_end = stram_pool + 512*1024 - 1;
++ DPRINTK("atari_stram pool, start=%08lx, end=%08lx\n", stram_pool, stram_pool_end);
+ }
+
+ void atari_stram_mem_init_hook (void)
+@@ -162,6 +170,38 @@
+ mem_init_done = 1;
+ }
+
++/* find a region (by size) in the free list */
++static void *find_free_stram( long size )
++{
++ BLOCK *p,*q,*r;
++ unsigned long item;
++
++ q=NULL;
++ r=stram_free_list;
++ for( p = stram_free_list; p; p = p->next ) {
++ if (p->size >= size) {
++ q=p;
++ break;
++ }
++ r=p;
++ }
++
++ /* remove from free list - FIXME, untested! */
++ if (q) {
++ item = (unsigned long) q->start;
++ r->next = q->next;
++ return (void *) item;
++ }
++ /* take from pool */
++ if ( (stram_pool_end - stram_pool) > size) {
++ item = stram_pool;
++ stram_pool += size;
++ return (void *) item;
++ }
++
++ return( NULL );
++}
++
+
+ /*
+ * This is main public interface: somehow allocate a ST-RAM block
+@@ -188,11 +228,17 @@
+ if (!mem_init_done)
+ return alloc_bootmem_low(size);
+ else {
++ if ((addr = find_free_stram(size)) != NULL) {
++ flags = BLOCK_POOL;
++ DPRINTK( "atari_stram_alloc: after mem_init, "
++ "find_free_Stram=%p\n", addr );
++ } else {
+ /* After mem_init(): can only resort to __get_dma_pages() */
+- addr = (void *)__get_dma_pages(GFP_KERNEL, get_order(size));
+- flags = BLOCK_GFP;
+- DPRINTK( "atari_stram_alloc: after mem_init, "
++ addr = (void *)__get_dma_pages(GFP_KERNEL, get_order(size));
++ flags = BLOCK_GFP;
++ DPRINTK( "atari_stram_alloc: after mem_init, "
+ "get_pages=%p\n", addr );
++ }
+ }
+
+ if (addr) {
Modified: dists/trunk/linux-2.6/debian/patches/series/1~experimental.1-extra
==============================================================================
--- dists/trunk/linux-2.6/debian/patches/series/1~experimental.1-extra (original)
+++ dists/trunk/linux-2.6/debian/patches/series/1~experimental.1-extra Tue Jul 29 17:32:33 2008
@@ -46,6 +46,7 @@
+ bugfix/m68k/2.6.26/m68k-apollo-remove-the-unused-APOLLO_ELPLUS-option.diff arch=m68k
+ bugfix/m68k/2.6.26/m68k-motorola-eliminate-NULL-test-and-memset-after-alloc_bootmem.diff arch=m68k
+ bugfix/m68k/2.6.26/m68k-sun3-eliminate-NULL-test-and-memset-after-alloc_bootmem.diff arch=m68k
++ bugfix/m68k/2.6.26/dio-use-dio_match_device.diff arch=m68k
+ bugfix/m68k/2.6.26/m68k-initrd-fix.diff arch=m68k
# --- pending ---
@@ -87,3 +88,7 @@
+ bugfix/m68k/2.6.26/m68k-add-support-for-ARAnyM-block-and-console-access.diff arch=m68k
+ bugfix/m68k/2.6.26/drivers-macintosh-possible-cleanups.diff arch=m68k
+# srm: fixes video for ramdisk booting
+# this is a preliminary patch by Michael Schmitz
++ bugfix/m68k/2.6.26/m68k-atari-stram.diff arch=m68k
+
More information about the Kernel-svn-changes
mailing list