lkml.org 
[lkml]   [1999]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] 2.3.25 for ppc

attached is a patch against vanilla 2.3.25 for ppc. many of these
are from my 2.3.24 patch which didn't have time to get in, but .25
generated some new problems...

a 2.3.25ppc kernel is also available (with dot.config) at
ftp://devel.linuxppc.org/users/ajoshi

here's whats in the patch:

o include/asm-ppc/pgtable.h
added encode/decode swap entry macros

o arch/ppc/defconfig
changed the defconfig from gemini to pmac

o arch/ppc/kernel/pmac_setup.c
level2 cache flag for when printk'ing "Level 2 cache
enabled", which is printed where the machine has
l2 cache or not

o arch/ppc/kernel/setup.c
added the get_pvr() value for PowerPC 7400 (G4) which
*still* isn't in there (!)

o arch/ppc/kernel/pmac_support.c
some #ifdef's for CONFIG_ADB_PMU

o arch/ppc/kernel/ppc_ksyms.c
more #ifdefs for CONFIG_ADB_PMU

o arch/ppc/mm/init.c
in freeing bootmem bitmap from available mem, size
should be boot_mapsize + start

o drivers/block/ide-pmac.c
many #ifdef CONFIG_PMAC_PBOOK's for all the
media_bay calls

o drivers/block/swim3.c
see ide-pmac.c

o drivers/net/pcnet32.c
kept it from probing VLB on ppc, which causes a panic

o drivers/video/aty128fb.c
#ifndef's around the non-OF and non-PPC functions
o drivers/video/fbmem.c
vm_offset is changed to vm_pgoff in vm_area_struct

o drivers/video/chipsfb.c
fixed missing declarations for the vc_mode and fb_info
for xpmac compatibility

o fs/hfs/file.c
removed update_vm_cache() which is *still* in there (!)
and yes, doing simply this *does* work on my system,
no HFS problems at all so far (though others have
reported problems (?))


ani
diff -uNr linux.orig/arch/ppc/defconfig linux/arch/ppc/defconfig
--- linux.orig/arch/ppc/defconfig Mon Nov 1 19:48:23 1999
+++ linux/arch/ppc/defconfig Tue Nov 2 23:21:56 1999
@@ -21,14 +21,14 @@
# CONFIG_BSEIP is not set
# CONFIG_MBX is not set
# CONFIG_WINCEPT is not set
-# CONFIG_PMAC is not set
+CONFIG_PMAC=y
# CONFIG_PREP is not set
# CONFIG_CHRP is not set
# CONFIG_ALL_PPC is not set
-CONFIG_GEMINI=y
+# CONFIG_GEMINI is not set
# CONFIG_APUS is not set
# CONFIG_SMP is not set
-CONFIG_MACH_SPECIFIC=y
+# CONFIG_MACH_SPECIFIC is not set
CONFIG_6xx=y

#
@@ -36,7 +36,7 @@
#
CONFIG_EXPERIMENTAL=y
CONFIG_MODULES=y
-CONFIG_MODVERSIONS=y
+# CONFIG_MODVERSIONS is not set
CONFIG_KMOD=y
CONFIG_PCI=y
CONFIG_NET=y
@@ -48,14 +48,18 @@
# CONFIG_BINFMT_MISC is not set
# CONFIG_PARPORT is not set
# CONFIG_VGA_CONSOLE is not set
-# CONFIG_FB is not set
-# CONFIG_PMAC_PBOOK is not set
-# CONFIG_MAC_FLOPPY is not set
-# CONFIG_MAC_SERIAL is not set
-# CONFIG_ADB is not set
-# CONFIG_PROC_DEVICETREE is not set
+CONFIG_FB=y
+CONFIG_PMAC_PBOOK=y
+CONFIG_MAC_FLOPPY=y
+CONFIG_MAC_SERIAL=y
+CONFIG_ADB=y
+CONFIG_ADB_CUDA=y
+CONFIG_ADB_MACIO=y
+CONFIG_ADB_PMU=y
+CONFIG_ADB_KEYBOARD=y
+CONFIG_PROC_DEVICETREE=y
# CONFIG_TOTALMP is not set
-# CONFIG_BOOTX_TEXT is not set
+CONFIG_BOOTX_TEXT=y
# CONFIG_MOTOROLA_HOTSWAP is not set

#
@@ -67,7 +71,12 @@
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_IDE is not set
+CONFIG_BLK_DEV_IDE=y
+CONFIG_BLK_DEV_IDEDISK=y
+CONFIG_BLK_DEV_IDECD=y
+CONFIG_BLK_DEV_IDE_PMAC=y
+CONFIG_BLK_DEV_IDEDMA_PMAC=y
+CONFIG_IDEDMA_PMAC_AUTO=y

#
# Please see Documentation/ide.txt for help/info on IDE drives
@@ -83,7 +92,7 @@
# CONFIG_BLK_DEV_MD is not set
# CONFIG_BLK_DEV_RAM is not set
# CONFIG_BLK_DEV_XD is not set
-CONFIG_PARIDE_PARPORT=y
+# CONFIG_PARIDE_PARPORT is not set
# CONFIG_PARIDE is not set
# CONFIG_BLK_DEV_IDE_MODES is not set
# CONFIG_BLK_DEV_HD is not set
@@ -147,7 +156,7 @@
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=y
-# CONFIG_CHR_DEV_ST is not set
+CONFIG_CHR_DEV_ST=y
CONFIG_BLK_DEV_SR=y
CONFIG_BLK_DEV_SR_VENDOR=y
# CONFIG_CHR_DEV_SG is not set
@@ -167,7 +176,10 @@
# CONFIG_SCSI_AHA152X is not set
# CONFIG_SCSI_AHA1542 is not set
# CONFIG_SCSI_AHA1740 is not set
-# CONFIG_SCSI_AIC7XXX is not set
+CONFIG_SCSI_AIC7XXX=y
+CONFIG_AIC7XXX_CMDS_PER_DEVICE=8
+CONFIG_AIC7XXX_PROC_STATS=y
+CONFIG_AIC7XXX_RESET_DELAYS=15
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_IN2000 is not set
@@ -210,8 +222,9 @@
# CONFIG_SCSI_U14_34F is not set
# CONFIG_SCSI_ULTRASTOR is not set
# CONFIG_SCSI_DEBUG is not set
-# CONFIG_SCSI_MESH is not set
-# CONFIG_SCSI_MAC53C94 is not set
+CONFIG_SCSI_MESH=y
+CONFIG_SCSI_MESH_SYNC_RATE=5
+CONFIG_SCSI_MAC53C94=y

#
# Network device support
@@ -231,8 +244,8 @@
# Ethernet (10 or 100Mbit)
#
CONFIG_NET_ETHERNET=y
-# CONFIG_MACE is not set
-# CONFIG_BMAC is not set
+CONFIG_MACE=y
+CONFIG_BMAC=y
CONFIG_NCR885E=y
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_LANCE is not set
@@ -243,7 +256,9 @@
# CONFIG_YELLOWFIN is not set
# CONFIG_ACENIC is not set
# CONFIG_NET_ISA is not set
-# CONFIG_NET_EISA is not set
+CONFIG_NET_EISA=y
+CONFIG_PCNET32=y
+CONFIG_DE4X5=y
# CONFIG_NET_POCKET is not set
# CONFIG_FDDI is not set
# CONFIG_HIPPI is not set
@@ -285,14 +300,30 @@
#
# Console drivers
#
+CONFIG_DUMMY_CONSOL=y
+CONFIG_FB_OF=y
+CONFIG_FB_CONTROL=y
+CONFIG_FB_PLATINUM=y
+CONFIG_FB_VALKYRIE=y
+CONFIG_FB_IMSTT=y
+CONFIG_FB_C65550=y
+CONFIG_FB_MATROX=y
+CONFIG_FB_ATY=y
+CONFIG_FBCON_ADVANCE=y
+CONFIG_FBCON_CFB8=y
+CONFIG_FBCON_CFB16=y
+CONFIG_FBCON_CFB24=y
+CONFIG_FBCON_CFB32=y
+CONFIG_FONT_8x16=y
+CONFIG_FONT_SUN8x16=y

#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
-CONFIG_SERIAL=y
-CONFIG_SERIAL_CONSOLE=y
+# CONFIG_SERIAL is not set
+# CONFIG_SERIAL_CONSOLE is not set
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
CONFIG_UNIX98_PTYS=y
@@ -311,7 +342,7 @@
# CONFIG_PC110_PAD is not set
# CONFIG_QIC02_TAPE is not set
# CONFIG_WATCHDOG is not set
-# CONFIG_NVRAM is not set
+CONFIG_NVRAM=y
# CONFIG_RTC is not set

#
@@ -350,7 +381,7 @@
# Filesystems
#
# CONFIG_QUOTA is not set
-# CONFIG_AUTOFS_FS is not set
+CONFIG_AUTOFS_FS=y
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
@@ -397,7 +428,8 @@
#
# Sound
#
-# CONFIG_SOUND is not set
+CONFIG_SOUND=y
+CONFIG_DMASOUND=y

#
# Kernel hacking
diff -uNr linux.orig/arch/ppc/kernel/pmac_setup.c linux/arch/ppc/kernel/pmac_setup.c
--- linux.orig/arch/ppc/kernel/pmac_setup.c Sun Oct 24 16:43:51 1999
+++ linux/arch/ppc/kernel/pmac_setup.c Tue Nov 2 23:22:51 1999
@@ -96,6 +96,7 @@

int ppc_override_l2cr = 0;
int ppc_override_l2cr_value;
+int has_l2cache = 0;

extern char saved_command_line[];

@@ -147,6 +148,7 @@
unsigned int *dc = (unsigned int *)
get_property(np, "d-cache-size", NULL);
len += sprintf(buffer+len, "L2 cache\t:");
+ has_l2cache = 1;
if (get_property(np, "cache-unified", NULL) != 0 && dc) {
len += sprintf(buffer+len, " %dK unified", *dc / 1024);
} else {
@@ -359,7 +361,8 @@
sysctrl_regs[4] |= 0x04000020;
else
sysctrl_regs[4] |= 0x04000000;
- printk(KERN_INFO "Level 2 cache enabled\n");
+ if(has_l2cache)
+ printk(KERN_INFO "Level 2 cache enabled\n");
}
}
}
diff -uNr linux.orig/arch/ppc/kernel/pmac_support.c linux/arch/ppc/kernel/pmac_support.c
--- linux.orig/arch/ppc/kernel/pmac_support.c Wed Oct 20 01:52:54 1999
+++ linux/arch/ppc/kernel/pmac_support.c Tue Nov 2 23:26:53 1999
@@ -60,6 +60,7 @@
struct adb_request req;

switch (nvram_naddrs) {
+#ifdef CONFIG_ADB_PMU
case -1:
if (pmu_request(&req, NULL, 3, PMU_READ_NVRAM,
(addr >> 8) & 0xff, addr & 0xff))
@@ -67,6 +68,7 @@
while (!req.complete)
pmu_poll();
return req.reply[1];
+#endif
case 1:
return nvram_data[(addr & (NVRAM_SIZE - 1)) * nvram_mult];
case 2:
@@ -82,6 +84,7 @@
struct adb_request req;

switch (nvram_naddrs) {
+#ifdef CONFIG_ADB_PMU
case -1:
if (pmu_request(&req, NULL, 4, PMU_WRITE_NVRAM,
(addr >> 8) & 0xff, addr & 0xff, val))
@@ -89,6 +92,7 @@
while (!req.complete)
pmu_poll();
break;
+#endif
case 1:
nvram_data[(addr & (NVRAM_SIZE - 1)) * nvram_mult] = val;
break;
diff -uNr linux.orig/arch/ppc/kernel/ppc_ksyms.c linux/arch/ppc/kernel/ppc_ksyms.c
--- linux.orig/arch/ppc/kernel/ppc_ksyms.c Sun Oct 24 16:43:51 1999
+++ linux/arch/ppc/kernel/ppc_ksyms.c Tue Nov 2 23:27:59 1999
@@ -209,8 +209,10 @@
EXPORT_SYMBOL(adb_register);
EXPORT_SYMBOL(cuda_request);
EXPORT_SYMBOL(cuda_poll);
+#ifdef CONFIG_ADB_PMU
EXPORT_SYMBOL(pmu_request);
EXPORT_SYMBOL(pmu_poll);
+#endif /* CONFIG_ADB_PMU */
#endif /* CONFIG_ADB */
#ifdef CONFIG_PMAC_PBOOK
EXPORT_SYMBOL(pmu_register_sleep_notifier);
diff -uNr linux.orig/arch/ppc/kernel/setup.c linux/arch/ppc/kernel/setup.c
--- linux.orig/arch/ppc/kernel/setup.c Mon Nov 1 19:48:23 1999
+++ linux/arch/ppc/kernel/setup.c Tue Nov 2 23:28:45 1999
@@ -245,6 +245,9 @@
case 10:
len += sprintf(len+buffer, "604ev5 (MachV)\n");
break;
+ case 12:
+ len += sprintf(len+buffer, "7400 (G4)\n");
+ break;
case 50:
len += sprintf(len+buffer, "821\n");
case 80:
diff -uNr linux.orig/arch/ppc/mm/init.c linux/arch/ppc/mm/init.c
--- linux.orig/arch/ppc/mm/init.c Mon Nov 1 19:48:24 1999
+++ linux/arch/ppc/mm/init.c Wed Nov 3 01:57:25 1999
@@ -1155,7 +1155,7 @@
__pa(end_of_DRAM) >> PAGE_SHIFT);

/* remove the bootmem bitmap from the available memory */
- remove_mem_piece(&phys_avail, start, boot_mapsize, 1);
+ remove_mem_piece(&phys_avail, start, start+ boot_mapsize, 1);
/* add everything in phys_avail into the bootmem map */
for (i = 0; i < phys_avail.n_regions; ++i)
free_bootmem(phys_avail.regions[i].address,
diff -uNr linux.orig/drivers/block/ide-pmac.c linux/drivers/block/ide-pmac.c
--- linux.orig/drivers/block/ide-pmac.c Sun Oct 24 16:43:52 1999
+++ linux/drivers/block/ide-pmac.c Tue Nov 2 23:30:40 1999
@@ -85,6 +85,7 @@
return;
}

+#ifdef CONFIG_PMAC_PBOOK
/* we check only for -EINVAL meaning that we have found a matching
bay but with the wrong device type */
i = check_media_bay_by_base(data_port, MB_CD);
@@ -92,6 +93,7 @@
hw->io_ports[IDE_DATA_OFFSET] = 0;
return;
}
+#endif

for (i = 0; i < 8; ++i)
hw->io_ports[i] = data_port + i * 0x10;
@@ -200,10 +202,12 @@
pmac_ide_irq[i] = irq;
pmac_ide_node[i] = np;

+#ifdef CONFIG_PMAC_PBOOK
if (np->parent && np->parent->name
&& strcasecmp(np->parent->name, "media-bay") == 0) {
media_bay_set_ide_infos(np->parent,base,irq,i);
} else
+#endif
feature_set(np, FEATURE_IDE_enable);

hwif = &ide_hwifs[i];
diff -uNr linux.orig/drivers/block/swim3.c linux/drivers/block/swim3.c
--- linux.orig/drivers/block/swim3.c Wed May 12 02:36:27 1999
+++ linux/drivers/block/swim3.c Tue Nov 2 23:31:59 1999
@@ -295,9 +295,11 @@
int i;
for(i=0;i<floppy_count;i++)
{
+#ifdef CONFIG_PMAC_PBOOK
if (floppy_states[i].media_bay &&
check_media_bay(floppy_states[i].media_bay, MB_FD))
continue;
+#endif
start_request(&floppy_states[i]);
}
sti();
@@ -827,8 +829,10 @@

fs = &floppy_states[devnum];

+#ifdef CONFIG_PMAC_PBOOK
if (fs->media_bay && check_media_bay(fs->media_bay, MB_FD))
return -ENXIO;
+#endif

switch (cmd) {
case FDEJECT:
@@ -860,8 +864,10 @@
sw = fs->swim3;
err = 0;
if (fs->ref_count == 0) {
+#ifdef CONFIG_PMAC_PBOOK
if (fs->media_bay && check_media_bay(fs->media_bay, MB_FD))
return -ENXIO;
+#endif
out_8(&sw->mode, 0x95);
out_8(&sw->control_bic, 0xff);
out_8(&sw->setup, S_IBM_DRIVE | S_FCLK_DIV2);
@@ -976,8 +982,10 @@

fs = &floppy_states[devnum];

+#ifdef CONFIG_PMAC_PBOOK
if (fs->media_bay && check_media_bay(fs->media_bay, MB_FD))
return -ENXIO;
+#endif

sw = fs->swim3;
grab_drive(fs, revalidating, 0);
diff -uNr linux.orig/drivers/net/pcnet32.c linux/drivers/net/pcnet32.c
--- linux.orig/drivers/net/pcnet32.c Wed Oct 20 01:52:17 1999
+++ linux/drivers/net/pcnet32.c Tue Nov 2 23:32:59 1999
@@ -488,7 +488,8 @@
}
} else
#endif /* defined(CONFIG_PCI) */
-
+
+#ifndef __powerpc__
/* now look for PCnet32 VLB cards */
for (port = pcnet32_portlist; *port; port++) {
unsigned long ioaddr = *port;
@@ -501,6 +502,7 @@
cards_found++;
}
}
+#endif
return cards_found ? 0: ENODEV;
}

diff -uNr linux.orig/drivers/video/aty128fb.c linux/drivers/video/aty128fb.c
--- linux.orig/drivers/video/aty128fb.c Sun Oct 24 16:43:59 1999
+++ linux/drivers/video/aty128fb.c Tue Nov 2 23:35:04 1999
@@ -257,10 +257,14 @@
static int aty128_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
u_int transp, struct fb_info *info);
static void do_install_cmap(int con, struct fb_info *info);
+#ifndef CONFIG_FB_OF
static void aty128pci_probe(void);
+#endif
+#ifndef CONFIG_PPC
static int aty128find_ROM(struct fb_info_aty128 *info);
-static void aty128_timings(struct fb_info_aty128 *info);
static void aty128_get_pllinfo(struct fb_info_aty128 *info);
+#endif
+static void aty128_timings(struct fb_info_aty128 *info);
static void aty128_reset_engine(const struct fb_info_aty128 *info);
static void aty128_flush_pixel_cache(const struct fb_info_aty128 *info);
static void wait_for_fifo(u16 entries, const struct fb_info_aty128 *info);
@@ -1595,6 +1599,7 @@
}


+#ifndef CONFIG_FB_OF
void
aty128pci_probe(void)
{
@@ -1681,8 +1686,10 @@
}
}
}
+#endif /* ! CONFIG_FB_OF */


+#ifndef CONFIG_PPC
static int
aty128find_ROM(struct fb_info_aty128 *info)
{
@@ -1799,6 +1806,7 @@
DBG("L aty128get_pllinfo");
return;
}
+#endif /* ! CONFIG_PPC */


#ifdef CONFIG_FB_OF
diff -uNr linux.orig/drivers/video/chipsfb.c linux/drivers/video/chipsfb.c
--- linux.orig/drivers/video/chipsfb.c Sun Oct 24 16:43:59 1999
+++ linux/drivers/video/chipsfb.c Tue Nov 2 23:37:05 1999
@@ -109,6 +109,11 @@
};
#endif

+#ifdef CONFIG_FB_COMPAT_XPMAC
+extern struct vc_mode display_info;
+extern struct fb_info *console_fb_info;
+#endif
+
/*
* Exported functions
*/
@@ -417,7 +422,7 @@
disp->visual = fix->visual;
disp->var = *var;

-#if (defined(CONFIG_PMAC_PBOOK) || defined(CONFIG_FB_COMPAT_XPMAC))
+#ifdef CONFIG_FB_COMPAT_XPMAC
display_info.depth = bpp;
display_info.pitch = fix->line_length;
#endif
diff -uNr linux.orig/drivers/video/fbmem.c linux/drivers/video/fbmem.c
--- linux.orig/drivers/video/fbmem.c Tue Nov 2 22:55:54 1999
+++ linux/drivers/video/fbmem.c Wed Nov 3 00:17:09 1999
@@ -505,9 +505,9 @@
len = (start & ~PAGE_MASK)+fix.smem_len;
start &= PAGE_MASK;
len = (len+~PAGE_MASK) & PAGE_MASK;
- if (vma->vm_offset >= len) {
+ if ((vma->vm_pgoff << PAGE_SHIFT) >= len) {
/* memory mapped io */
- vma->vm_offset -= len;
+ vma->vm_pgoff -= len;
fb->fb_get_var(&var, PROC_CONSOLE(info), info);
if (var.accel_flags)
return -EINVAL;
@@ -516,10 +516,10 @@
start &= PAGE_MASK;
len = (len+~PAGE_MASK) & PAGE_MASK;
}
- if ((vma->vm_end - vma->vm_start + vma->vm_offset) > len)
+ if ((vma->vm_end - vma->vm_start + (vma->vm_pgoff << PAGE_SHIFT)) > len)
return -EINVAL;
- vma->vm_offset += start;
- if (vma->vm_offset & ~PAGE_MASK)
+ vma->vm_pgoff += start;
+ if ((vma->vm_pgoff << PAGE_SHIFT) & ~PAGE_MASK)
return -ENXIO;
#if defined(__mc68000__)
if (CPU_IS_020_OR_030)
@@ -549,7 +549,7 @@
#else
#warning What do we have to do here??
#endif
- if (io_remap_page_range(vma->vm_start, vma->vm_offset,
+ if (io_remap_page_range(vma->vm_start, vma->vm_pgoff << PAGE_SHIFT,
vma->vm_end - vma->vm_start, vma->vm_page_prot))
return -EAGAIN;
return 0;
diff -uNr linux.orig/fs/hfs/file.c linux/fs/hfs/file.c
--- linux.orig/fs/hfs/file.c Sun Jun 27 13:10:41 1999
+++ linux/fs/hfs/file.c Tue Nov 2 23:37:22 1999
@@ -498,7 +498,6 @@
written = -EFAULT;
break;
}
- update_vm_cache(inode,pos,p,c);
pos += c;
written += c;
buf += c;
diff -uNr linux.orig/include/asm-ppc/pgtable.h linux/include/asm-ppc/pgtable.h
--- linux.orig/include/asm-ppc/pgtable.h Mon Nov 1 19:48:31 1999
+++ linux/include/asm-ppc/pgtable.h Wed Nov 3 01:18:20 1999
@@ -628,10 +628,12 @@
extern void flush_hash_segments(unsigned low_vsid, unsigned high_vsid);
extern void flush_hash_page(unsigned context, unsigned long va);

-
-#define SWP_TYPE(entry) (((pte_val(entry)) >> 1) & 0x7f)
-#define SWP_OFFSET(entry) ((pte_val(entry)) >> 8)
-#define SWP_ENTRY(type,offset) __pte(((type) << 1) | ((offset) << 8))
+/* Encode and decode a swap entry */
+#define SWP_TYPE(x) (((x).val >> 1) & 0x7f)
+#define SWP_OFFSET(x) ((x).val >> 8)
+#define SWP_ENTRY(type,offset) ((swp_entry_t) { ((type) << 1) | ((offset) << 8) })
+#define pte_to_swp_entry(pte) ((swp_entry_t) { pte_val(pte) })
+#define swp_entry_to_pte(x) ((pte_t) { (x).val })

#define module_map vmalloc
#define module_unmap vfree
\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.105 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site