diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c index 19186ce8850d15768e8b322a8d3b5a2d79e1728b..0bd69d0b5cd7f75ee293d06ff4ab3c81a0ec48dd 100644 --- a/arch/sparc/kernel/process.c +++ b/arch/sparc/kernel/process.c @@ -141,16 +141,12 @@ void cpu_idle(void) extern char reboot_command []; -extern void (*prom_palette)(int); - /* XXX cli/sti -> local_irq_xxx here, check this works once SMP is fixed. */ void machine_halt(void) { local_irq_enable(); mdelay(8); local_irq_disable(); - if (prom_palette) - prom_palette (1); prom_halt(); panic("Halt failed!"); } @@ -165,8 +161,6 @@ void machine_restart(char * cmd) p = strchr (reboot_command, '\n'); if (p) *p = 0; - if (prom_palette) - prom_palette (1); if (cmd) prom_reboot(cmd); if (*reboot_command) diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c index 3cf78f160846bf68432f762285fab8a7644e8e3c..3c13137685da8a281adee5bccf44c5f5f4438654 100644 --- a/arch/sparc/kernel/setup.c +++ b/arch/sparc/kernel/setup.c @@ -65,7 +65,6 @@ struct screen_info screen_info = { */ extern unsigned long trapbase; -void (*prom_palette)(int); /* Pretty sick eh? */ void prom_sync_me(void) @@ -80,8 +79,6 @@ void prom_sync_me(void) "nop\n\t" "nop\n\t" : : "r" (&trapbase)); - if (prom_palette) - prom_palette(1); prom_printf("PROM SYNC COMMAND...\n"); show_free_areas(); if(current->pid != 0) { @@ -191,7 +188,6 @@ extern int prom_probe_memory(void); extern void sun4c_probe_vac(void); extern char cputypval; extern unsigned long start, end; -extern void panic_setup(char *, int *); extern unsigned short root_flags; extern unsigned short root_dev; diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c index c0442e8c4b1548a784037d1dbe223e996dcefd95..2375fe9dc3124346673dfb462d2a137b05374a92 100644 --- a/arch/sparc/mm/sun4c.c +++ b/arch/sparc/mm/sun4c.c @@ -1941,9 +1941,7 @@ static pte_t *sun4c_pte_alloc_one_kernel(struct mm_struct *mm, unsigned long add if ((pte = sun4c_pte_alloc_one_fast(mm, address)) != NULL) return pte; - pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT); - if (pte) - memset(pte, 0, PAGE_SIZE); + pte = (pte_t *)get_zeroed_page(GFP_KERNEL|__GFP_REPEAT); return pte; } diff --git a/arch/sparc/prom/misc.c b/arch/sparc/prom/misc.c index 37cff5f54704aaf205f66689582acb744ca55110..d9fb3af41c1f7df07d9f69345a0a221a958adac8 100644 --- a/arch/sparc/prom/misc.c +++ b/arch/sparc/prom/misc.c @@ -45,9 +45,6 @@ prom_feval(char *fstring) spin_unlock_irqrestore(&prom_lock, flags); } -/* We want to do this more nicely some day. */ -extern void (*prom_palette)(int); - /* Drop into the prom, with the chance to continue with the 'go' * prom command. */ @@ -58,8 +55,6 @@ prom_cmdline(void) extern void install_linux_ticker(void); unsigned long flags; - if (prom_palette) - prom_palette (1); spin_lock_irqsave(&prom_lock, flags); install_obp_ticker(); (*(romvec->pv_abort))(); @@ -69,8 +64,6 @@ prom_cmdline(void) #ifdef CONFIG_SUN_AUXIO set_auxio(AUXIO_LED, 0); #endif - if (prom_palette) - prom_palette (0); } /* Drop into the prom, but completely terminate the program. diff --git a/arch/sparc64/Kconfig.debug b/arch/sparc64/Kconfig.debug index a5faa3683bd6142fced745574163df555a63e2f5..6a4d28a4076d0df87e637a3292a21fefcd8bd07a 100644 --- a/arch/sparc64/Kconfig.debug +++ b/arch/sparc64/Kconfig.debug @@ -23,10 +23,6 @@ config STACK_DEBUG depends on DEBUG_KERNEL bool "Stack Overflow Detection Support" -config DEBUG_BOOTMEM - depends on DEBUG_KERNEL - bool "Debug BOOTMEM initialization" - config DEBUG_PAGEALLOC bool "Debug page memory allocations" depends on DEBUG_KERNEL && !HIBERNATION diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile index 01159cb5f16d4d9878206027f391c45fa24f2a20..f0c22f82698299c0143b263848828d7fd0834016 100644 --- a/arch/sparc64/Makefile +++ b/arch/sparc64/Makefile @@ -12,39 +12,13 @@ CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -m64 CPPFLAGS_vmlinux.lds += -Usparc -CC := $(shell if $(CC) -m64 -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo $(CC); else echo sparc64-linux-gcc; fi ) - -NEW_GCC := $(call cc-option-yn, -m64 -mcmodel=medlow) -NEW_GAS := $(shell if $(LD) -V 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi) -UNDECLARED_REGS := $(shell if $(CC) -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null; then echo y; else echo n; fi; ) - -ifneq ($(NEW_GAS),y) -AS = sparc64-linux-as -LD = sparc64-linux-ld -NM = sparc64-linux-nm -AR = sparc64-linux-ar -RANLIB = sparc64-linux-ranlib -else -AS := $(AS) -64 LDFLAGS := -m elf64_sparc -endif -ifneq ($(UNDECLARED_REGS),y) -CC_UNDECL = -else -CC_UNDECL = -Wa,--undeclared-regs -AS := $(AS) --undeclared-regs -endif - -ifneq ($(NEW_GCC),y) - KBUILD_CFLAGS += -pipe -mno-fpu -mtune=ultrasparc -mmedlow \ - -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare -else - KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \ - -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \ - $(CC_UNDECL) - KBUILD_AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL) -endif +KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \ + -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare \ + -Wa,--undeclared-regs +KBUILD_CFLAGS += $(call cc-option,-mtune=ultrasparc3) +KBUILD_AFLAGS += -m64 -mcpu=ultrasparc -Wa,--undeclared-regs ifeq ($(CONFIG_MCOUNT),y) KBUILD_CFLAGS += -pg diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig index 833d74b2b1923faa08e95c3604f2bbb5a7dddb86..250958d1e3cba242d990df88ad1a623855a1aad4 100644 --- a/arch/sparc64/defconfig +++ b/arch/sparc64/defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.24 -# Tue Feb 5 17:28:19 2008 +# Linux kernel version: 2.6.25-rc1 +# Sun Feb 17 22:44:12 2008 # CONFIG_SPARC=y CONFIG_SPARC64=y @@ -10,6 +10,7 @@ CONFIG_GENERIC_CMOS_UPDATE=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_64BIT=y CONFIG_MMU=y +CONFIG_IOMMU_HELPER=y CONFIG_QUICKLIST=y CONFIG_STACKTRACE_SUPPORT=y CONFIG_LOCKDEP_SUPPORT=y @@ -21,6 +22,7 @@ CONFIG_HAVE_SETUP_PER_CPU_AREA=y CONFIG_ARCH_NO_VIRT_TO_BUS=y CONFIG_OF=y CONFIG_GENERIC_HARDIRQS_NO__DO_IRQ=y +CONFIG_ARCH_SUPPORTS_AOUT=y CONFIG_SPARC64_PAGE_SIZE_8KB=y # CONFIG_SPARC64_PAGE_SIZE_64KB is not set # CONFIG_SPARC64_PAGE_SIZE_512KB is not set @@ -49,8 +51,6 @@ CONFIG_SYSVIPC_SYSCTL=y CONFIG_POSIX_MQUEUE=y # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_TASKSTATS is not set -# CONFIG_USER_NS is not set -# CONFIG_PID_NS is not set # CONFIG_AUDIT is not set # CONFIG_IKCONFIG is not set CONFIG_LOG_BUF_SHIFT=18 @@ -60,6 +60,11 @@ CONFIG_FAIR_USER_SCHED=y # CONFIG_FAIR_CGROUP_SCHED is not set CONFIG_SYSFS_DEPRECATED=y CONFIG_RELAY=y +CONFIG_NAMESPACES=y +# CONFIG_UTS_NS is not set +# CONFIG_IPC_NS is not set +# CONFIG_USER_NS is not set +# CONFIG_PID_NS is not set CONFIG_BLK_DEV_INITRD=y CONFIG_INITRAMFS_SOURCE="" CONFIG_CC_OPTIMIZE_FOR_SIZE=y @@ -74,6 +79,7 @@ CONFIG_HOTPLUG=y CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_ELF_CORE=y +# CONFIG_COMPAT_BRK is not set CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_ANON_INODES=y @@ -176,13 +182,13 @@ CONFIG_PCI_MSI=y CONFIG_SUN_OPENPROMFS=m CONFIG_SPARC32_COMPAT=y CONFIG_COMPAT=y -CONFIG_BINFMT_ELF32=y # CONFIG_BINFMT_AOUT32 is not set # # Executable file formats # CONFIG_BINFMT_ELF=y +CONFIG_COMPAT_BINFMT_ELF=y CONFIG_BINFMT_MISC=m CONFIG_SOLARIS_EMUL=y CONFIG_SCHED_SMT=y @@ -354,6 +360,8 @@ CONFIG_MISC_DEVICES=y # CONFIG_EEPROM_93CX6 is not set # CONFIG_SGI_IOC4 is not set # CONFIG_TIFM_CORE is not set +# CONFIG_ENCLOSURE_SERVICES is not set +CONFIG_HAVE_IDE=y CONFIG_IDE=y CONFIG_BLK_DEV_IDE=y @@ -376,6 +384,7 @@ CONFIG_IDE_PROC_FS=y # CONFIG_IDE_GENERIC=y # CONFIG_BLK_DEV_PLATFORM is not set +CONFIG_BLK_DEV_IDEDMA_SFF=y # # PCI IDE chipsets support @@ -775,7 +784,6 @@ CONFIG_I2C_ALGOBIT=y # CONFIG_SENSORS_EEPROM is not set # CONFIG_SENSORS_PCF8574 is not set # CONFIG_PCF8575 is not set -# CONFIG_SENSORS_PCA9539 is not set # CONFIG_SENSORS_PCF8591 is not set # CONFIG_TPS65010 is not set # CONFIG_SENSORS_MAX6875 is not set @@ -831,6 +839,7 @@ CONFIG_HWMON=y # CONFIG_SENSORS_SMSC47M1 is not set # CONFIG_SENSORS_SMSC47M192 is not set # CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_ADS7828 is not set # CONFIG_SENSORS_THMC50 is not set # CONFIG_SENSORS_VIA686A is not set # CONFIG_SENSORS_VT1211 is not set @@ -840,9 +849,11 @@ CONFIG_HWMON=y # CONFIG_SENSORS_W83792D is not set # CONFIG_SENSORS_W83793 is not set # CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83L786NG is not set # CONFIG_SENSORS_W83627HF is not set # CONFIG_SENSORS_W83627EHF is not set # CONFIG_HWMON_DEBUG_CHIP is not set +# CONFIG_THERMAL is not set # CONFIG_WATCHDOG is not set # @@ -1201,6 +1212,7 @@ CONFIG_USB_STORAGE=m # CONFIG_USB_TEST is not set # CONFIG_USB_GADGET is not set # CONFIG_MMC is not set +# CONFIG_MEMSTICK is not set # CONFIG_NEW_LEDS is not set # CONFIG_INFINIBAND is not set # CONFIG_RTC_CLASS is not set @@ -1242,12 +1254,10 @@ CONFIG_FS_POSIX_ACL=y # CONFIG_XFS_FS is not set # CONFIG_GFS2_FS is not set # CONFIG_OCFS2_FS is not set -# CONFIG_MINIX_FS is not set -# CONFIG_ROMFS_FS is not set +CONFIG_DNOTIFY=y CONFIG_INOTIFY=y CONFIG_INOTIFY_USER=y # CONFIG_QUOTA is not set -CONFIG_DNOTIFY=y # CONFIG_AUTOFS_FS is not set # CONFIG_AUTOFS4_FS is not set # CONFIG_FUSE_FS is not set @@ -1291,8 +1301,10 @@ CONFIG_HUGETLB_PAGE=y # CONFIG_EFS_FS is not set # CONFIG_CRAMFS is not set # CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set # CONFIG_HPFS_FS is not set # CONFIG_QNX4FS_FS is not set +# CONFIG_ROMFS_FS is not set # CONFIG_SYSV_FS is not set # CONFIG_UFS_FS is not set CONFIG_NETWORK_FILESYSTEMS=y @@ -1370,6 +1382,7 @@ CONFIG_DETECT_SOFTLOCKUP=y CONFIG_SCHEDSTATS=y # CONFIG_TIMER_STATS is not set # CONFIG_SLUB_DEBUG_ON is not set +# CONFIG_SLUB_STATS is not set # CONFIG_DEBUG_RT_MUTEXES is not set # CONFIG_RT_MUTEX_TESTER is not set # CONFIG_DEBUG_SPINLOCK is not set @@ -1385,7 +1398,6 @@ CONFIG_DEBUG_BUGVERBOSE=y # CONFIG_DEBUG_VM is not set # CONFIG_DEBUG_LIST is not set # CONFIG_DEBUG_SG is not set -CONFIG_FORCED_INLINING=y # CONFIG_BOOT_PRINTK_DELAY is not set # CONFIG_RCU_TORTURE_TEST is not set # CONFIG_KPROBES_SANITY_TEST is not set @@ -1396,7 +1408,6 @@ CONFIG_FORCED_INLINING=y # CONFIG_DEBUG_STACK_USAGE is not set # CONFIG_DEBUG_DCFLUSH is not set # CONFIG_STACK_DEBUG is not set -# CONFIG_DEBUG_BOOTMEM is not set # CONFIG_DEBUG_PAGEALLOC is not set # diff --git a/arch/sparc64/kernel/iommu.c b/arch/sparc64/kernel/iommu.c index d3276ebcfb4715a118268a8cb6c92640a33afcca..0e347ff812a336da425cba8b10a411fd6425ad1a 100644 --- a/arch/sparc64/kernel/iommu.c +++ b/arch/sparc64/kernel/iommu.c @@ -200,12 +200,11 @@ int iommu_table_init(struct iommu *iommu, int tsbsize, /* Allocate and initialize the dummy page which we * set inactive IO PTEs to point to. */ - iommu->dummy_page = __get_free_pages(GFP_KERNEL, 0); + iommu->dummy_page = get_zeroed_page(GFP_KERNEL); if (!iommu->dummy_page) { printk(KERN_ERR "IOMMU: Error, gfp(dummy_page) failed.\n"); goto out_free_map; } - memset((void *)iommu->dummy_page, 0, PAGE_SIZE); iommu->dummy_page_pa = (unsigned long) __pa(iommu->dummy_page); /* Now allocate and setup the IOMMU page table itself. */ diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index a61c38fe75ead3db51c7b0ae0eb4a01ef7b912ee..545356b00e2e14c956841ba8dc751041782d5ef3 100644 --- a/arch/sparc64/kernel/pci.c +++ b/arch/sparc64/kernel/pci.c @@ -225,20 +225,6 @@ static int __init pci_controller_init(const char *model_name, int namelen, struc return 0; } -static int __init pci_is_controller(const char *model_name, int namelen, struct device_node *dp) -{ - int i; - - for (i = 0; i < PCI_NUM_CONTROLLER_TYPES; i++) { - if (!strncmp(model_name, - pci_controller_table[i].model_name, - namelen)) { - return 1; - } - } - return 0; -} - static int __init pci_controller_scan(int (*handler)(const char *, int, struct device_node *)) { struct device_node *dp; @@ -273,13 +259,6 @@ static int __init pci_controller_scan(int (*handler)(const char *, int, struct d return count; } - -/* Is there some PCI controller in the system? */ -int __init pcic_present(void) -{ - return pci_controller_scan(pci_is_controller); -} - /* Find each controller in the system, attach and initialize * software state structure for each and link into the * pci_pbm_root. Setup the controller enough such diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 1b23791749883ded9994463012181930be49bade..6eceac51ae626e6fb77fd831142107f6eedf0347 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c @@ -113,16 +113,9 @@ void cpu_idle(void) extern char reboot_command []; -extern void (*prom_palette)(int); -extern void (*prom_keyboard)(void); - void machine_halt(void) { sstate_halt(); - if (prom_palette) - prom_palette (1); - if (prom_keyboard) - prom_keyboard(); prom_halt(); panic("Halt failed!"); } @@ -130,10 +123,6 @@ void machine_halt(void) void machine_alt_power_off(void) { sstate_poweroff(); - if (prom_palette) - prom_palette(1); - if (prom_keyboard) - prom_keyboard(); prom_halt_power_off(); panic("Power-off failed!"); } @@ -145,10 +134,6 @@ void machine_restart(char * cmd) sstate_reboot(); p = strchr (reboot_command, '\n'); if (p) *p = 0; - if (prom_palette) - prom_palette (1); - if (prom_keyboard) - prom_keyboard(); if (cmd) prom_reboot(cmd); if (*reboot_command) diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c index a246e962e5a73591d546d8d6c7ac2f950ad075d4..68964ddcde1e53bd5ce77207815cfe0bbc2068f3 100644 --- a/arch/sparc64/kernel/prom.c +++ b/arch/sparc64/kernel/prom.c @@ -1716,7 +1716,6 @@ static void __init of_console_init(void) of_console_device = dp; - prom_printf(msg, of_console_path); printk(msg, of_console_path); } diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index 5964d8653ade61bba45ebd492c02bf2b664502a9..d036dbe728647df285833ef7871a90b167cde0d9 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c @@ -68,33 +68,22 @@ struct screen_info screen_info = { 16 /* orig-video-points */ }; -void (*prom_palette)(int); -void (*prom_keyboard)(void); - static void prom_console_write(struct console *con, const char *s, unsigned n) { prom_write(s, n); } -unsigned int boot_flags = 0; -#define BOOTME_DEBUG 0x1 - /* Exported for mm/init.c:paging_init. */ unsigned long cmdline_memory_size = 0; -static struct console prom_debug_console = { - .name = "debug", +static struct console prom_early_console = { + .name = "earlyprom", .write = prom_console_write, - .flags = CON_PRINTBUFFER, + .flags = CON_PRINTBUFFER | CON_BOOT, .index = -1, }; -/* XXX Implement this at some point... */ -void kernel_enter_debugger(void) -{ -} - /* * Process kernel command line switches that are specific to the * SPARC or that require special low-level processing. @@ -103,8 +92,6 @@ static void __init process_switch(char c) { switch (c) { case 'd': - boot_flags |= BOOTME_DEBUG; - break; case 's': break; case 'h': @@ -112,8 +99,7 @@ static void __init process_switch(char c) prom_halt(); break; case 'p': - /* Use PROM debug console. */ - register_console(&prom_debug_console); + /* Just ignore, this behavior is now the default. */ break; case 'P': /* Force UltraSPARC-III P-Cache on. */ @@ -168,8 +154,6 @@ static void __init boot_flags_init(char *commands) } } -extern void panic_setup(char *, int *); - extern unsigned short root_flags; extern unsigned short root_dev; extern unsigned short ram_flags; @@ -296,6 +280,9 @@ void __init setup_arch(char **cmdline_p) *cmdline_p = prom_getbootargs(); strcpy(boot_command_line, *cmdline_p); + boot_flags_init(*cmdline_p); + register_console(&prom_early_console); + if (tlb_type == hypervisor) printk("ARCH: SUN4V\n"); else @@ -307,8 +294,6 @@ void __init setup_arch(char **cmdline_p) conswitchp = &prom_con; #endif - boot_flags_init(*cmdline_p); - idprom_init(); if (!root_flags) diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index 68db089303996498283df1cfe3466e0a71eaa6a8..51fa773f38c94ac52a8d9d8ef2382b25602d5bab 100644 --- a/arch/sparc64/kernel/sparc64_ksyms.c +++ b/arch/sparc64/kernel/sparc64_ksyms.c @@ -85,7 +85,6 @@ extern int (*handle_mathemu)(struct pt_regs *, struct fpustate *); extern long sparc32_open(const char __user * filename, int flags, int mode); extern int io_remap_pfn_range(struct vm_area_struct *vma, unsigned long from, unsigned long pfn, unsigned long size, pgprot_t prot); -extern void (*prom_palette)(int); extern int __ashrdi3(int, int); @@ -355,5 +354,3 @@ EXPORT_SYMBOL(xor_niagara_2); EXPORT_SYMBOL(xor_niagara_3); EXPORT_SYMBOL(xor_niagara_4); EXPORT_SYMBOL(xor_niagara_5); - -EXPORT_SYMBOL(prom_palette); diff --git a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c index dc7bf1b6321ceb89fbe658cce07f08f7df513808..1a511e9f0d3ecdacce569f4991458898487be72a 100644 --- a/arch/sparc64/kernel/unaligned.c +++ b/arch/sparc64/kernel/unaligned.c @@ -7,6 +7,7 @@ */ +#include #include #include #include @@ -283,7 +284,7 @@ static void log_unaligned(struct pt_regs *regs) { static unsigned long count, last_time; - if (jiffies - last_time > 5 * HZ) + if (time_after(jiffies, last_time + 5 * HZ)) count = 0; if (count < 5) { last_time = jiffies; diff --git a/arch/sparc64/mm/init.c b/arch/sparc64/mm/init.c index e726c45645ff3bc85df870d7eed4613427062133..9e6bca266d88338df73baf4dd1079a5c17672b69 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c @@ -618,9 +618,9 @@ static void __init inherit_prom_mappings(void) read_obp_translations(); /* Now fixup OBP's idea about where we really are mapped. */ - prom_printf("Remapping the kernel... "); + printk("Remapping the kernel... "); remap_kernel(); - prom_printf("done.\n"); + printk("done.\n"); } void prom_world(int enter) @@ -739,11 +739,6 @@ static unsigned long __init choose_bootmap_pfn(unsigned long start_pfn, avoid_end = PAGE_ALIGN(initrd_end); #endif -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("choose_bootmap_pfn: kern[%lx:%lx] avoid[%lx:%lx]\n", - kern_base, PAGE_ALIGN(kern_base + kern_size), - avoid_start, avoid_end); -#endif for (i = 0; i < pavail_ents; i++) { unsigned long start, end; @@ -777,10 +772,6 @@ static unsigned long __init choose_bootmap_pfn(unsigned long start_pfn, } /* OK, it doesn't overlap anything, use it. */ -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("choose_bootmap_pfn: Using %lx [%lx]\n", - start >> PAGE_SHIFT, start); -#endif return start >> PAGE_SHIFT; } } @@ -920,10 +911,6 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail, unsigned long bootmap_pfn, bytes_avail, size; int i; -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("bootmem_init: Scan pavail, "); -#endif - bytes_avail = 0UL; for (i = 0; i < pavail_ents; i++) { end_of_phys_memory = pavail[i].phys_addr + @@ -970,33 +957,20 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail, bootmap_pfn = choose_bootmap_pfn(min_low_pfn, end_pfn); -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("init_bootmem(min[%lx], bootmap[%lx], max[%lx])\n", - min_low_pfn, bootmap_pfn, max_low_pfn); -#endif bootmap_size = init_bootmem_node(NODE_DATA(0), bootmap_pfn, min_low_pfn, end_pfn); /* Now register the available physical memory with the * allocator. */ - for (i = 0; i < pavail_ents; i++) { -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("free_bootmem(pavail:%d): base[%lx] size[%lx]\n", - i, pavail[i].phys_addr, pavail[i].reg_size); -#endif + for (i = 0; i < pavail_ents; i++) free_bootmem(pavail[i].phys_addr, pavail[i].reg_size); - } #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start) { size = initrd_end - initrd_start; /* Reserve the initrd image area. */ -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("reserve_bootmem(initrd): base[%llx] size[%lx]\n", - initrd_start, initrd_end); -#endif reserve_bootmem(initrd_start, size, BOOTMEM_DEFAULT); initrd_start += PAGE_OFFSET; @@ -1004,9 +978,6 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail, } #endif /* Reserve the kernel text/data/bss. */ -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("reserve_bootmem(kernel): base[%lx] size[%lx]\n", kern_base, kern_size); -#endif reserve_bootmem(kern_base, kern_size, BOOTMEM_DEFAULT); *pages_avail -= PAGE_ALIGN(kern_size) >> PAGE_SHIFT; @@ -1020,10 +991,6 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail, * in free_all_bootmem. */ size = bootmap_size; -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("reserve_bootmem(bootmap): base[%lx] size[%lx]\n", - (bootmap_pfn << PAGE_SHIFT), size); -#endif reserve_bootmem((bootmap_pfn << PAGE_SHIFT), size, BOOTMEM_DEFAULT); for (i = 0; i < pavail_ents; i++) { @@ -1031,10 +998,6 @@ static unsigned long __init bootmem_init(unsigned long *pages_avail, start_pfn = pavail[i].phys_addr >> PAGE_SHIFT; end_pfn = (start_pfn + (pavail[i].reg_size >> PAGE_SHIFT)); -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("memory_present(0, %lx, %lx)\n", - start_pfn, end_pfn); -#endif memory_present(0, start_pfn, end_pfn); } @@ -1451,7 +1414,7 @@ void __init paging_init(void) zholes_size); } - prom_printf("Booting Linux...\n"); + printk("Booting Linux...\n"); central_probe(); cpu_probe(); @@ -1549,10 +1512,6 @@ void __init mem_init(void) high_memory = __va(last_valid_pfn << PAGE_SHIFT); -#ifdef CONFIG_DEBUG_BOOTMEM - prom_printf("mem_init: Calling free_all_bootmem().\n"); -#endif - /* We subtract one to account for the mem_map_zero page * allocated below. */ diff --git a/arch/sparc64/prom/misc.c b/arch/sparc64/prom/misc.c index bbec7522826c742bc6125dce589c3d2334590b05..47a877a15abd5fd39ef307d2f0bc6a6fdc4e8ba8 100644 --- a/arch/sparc64/prom/misc.c +++ b/arch/sparc64/prom/misc.c @@ -55,9 +55,6 @@ void prom_feval(const char *fstring) P1275_INOUT(1, 1), fstring); } -/* We want to do this more nicely some day. */ -extern void (*prom_palette)(int); - #ifdef CONFIG_SMP extern void smp_capture(void); extern void smp_release(void); @@ -72,9 +69,6 @@ void prom_cmdline(void) local_irq_save(flags); - if (prom_palette) - prom_palette(1); - #ifdef CONFIG_SMP smp_capture(); #endif @@ -85,9 +79,6 @@ void prom_cmdline(void) smp_release(); #endif - if (prom_palette) - prom_palette(0); - local_irq_restore(flags); } diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c index d775eb6590b6540976eb02c414e6825d1d739df6..62f9c6e387ccc3de3e65714ccec28c42eb38a7b8 100644 --- a/drivers/video/aty/atyfb_base.c +++ b/drivers/video/aty/atyfb_base.c @@ -1913,61 +1913,6 @@ static int atyfb_mmap(struct fb_info *info, struct vm_area_struct *vma) par->mmaped = 1; return 0; } - -static struct { - u32 yoffset; - u8 r[2][256]; - u8 g[2][256]; - u8 b[2][256]; -} atyfb_save; - -static void atyfb_save_palette(struct atyfb_par *par, int enter) -{ - int i, tmp; - - for (i = 0; i < 256; i++) { - tmp = aty_ld_8(DAC_CNTL, par) & 0xfc; - if (M64_HAS(EXTRA_BRIGHT)) - tmp |= 0x2; - aty_st_8(DAC_CNTL, tmp, par); - aty_st_8(DAC_MASK, 0xff, par); - - aty_st_8(DAC_R_INDEX, i, par); - atyfb_save.r[enter][i] = aty_ld_8(DAC_DATA, par); - atyfb_save.g[enter][i] = aty_ld_8(DAC_DATA, par); - atyfb_save.b[enter][i] = aty_ld_8(DAC_DATA, par); - aty_st_8(DAC_W_INDEX, i, par); - aty_st_8(DAC_DATA, atyfb_save.r[1 - enter][i], par); - aty_st_8(DAC_DATA, atyfb_save.g[1 - enter][i], par); - aty_st_8(DAC_DATA, atyfb_save.b[1 - enter][i], par); - } -} - -static void atyfb_palette(int enter) -{ - struct atyfb_par *par; - struct fb_info *info; - int i; - - for (i = 0; i < FB_MAX; i++) { - info = registered_fb[i]; - if (info && info->fbops == &atyfb_ops) { - par = (struct atyfb_par *) info->par; - - atyfb_save_palette(par, enter); - if (enter) { - atyfb_save.yoffset = info->var.yoffset; - info->var.yoffset = 0; - set_off_pitch(par, info); - } else { - info->var.yoffset = atyfb_save.yoffset; - set_off_pitch(par, info); - } - aty_st_le32(CRTC_OFF_PITCH, par->crtc.off_pitch, par); - break; - } - } -} #endif /* __sparc__ */ @@ -2670,10 +2615,6 @@ static int __devinit aty_init(struct fb_info *info) goto aty_init_exit; } -#ifdef __sparc__ - atyfb_save_palette(par, 0); -#endif - #ifdef CONFIG_FB_ATY_CT if (!noaccel && M64_HAS(INTEGRATED)) aty_init_cursor(info); @@ -2900,8 +2841,6 @@ static int atyfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, #ifdef __sparc__ -extern void (*prom_palette) (int); - static int __devinit atyfb_setup_sparc(struct pci_dev *pdev, struct fb_info *info, unsigned long addr) { @@ -3536,9 +3475,6 @@ static int __devinit atyfb_pci_probe(struct pci_dev *pdev, const struct pci_devi goto err_release_io; #ifdef __sparc__ - if (!prom_palette) - prom_palette = atyfb_palette; - /* * Add /dev/fb mmap values. */ diff --git a/drivers/video/cg14.c b/drivers/video/cg14.c index 41f6dbf61be7108108b0e174400fc7c58fb77199..fdc9f43ec30a73f5957cc118d91dc9711c870194 100644 --- a/drivers/video/cg14.c +++ b/drivers/video/cg14.c @@ -16,6 +16,7 @@ #include #include #include +#include #include #include diff --git a/drivers/video/sbuslib.c b/drivers/video/sbuslib.c index 963a454b70741ecb696802c98bd5e73dd83e146d..4deaac05b9380b6dc74a0ce4baf24db9ef4c1ef0 100644 --- a/drivers/video/sbuslib.c +++ b/drivers/video/sbuslib.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include diff --git a/include/asm-sparc64/ptrace.h b/include/asm-sparc64/ptrace.h index 8617c3a5143b266ba506f2b7512f4dc67ed3007b..67341cff2e6b28c1bc9932a9d09f0911dfc2aace 100644 --- a/include/asm-sparc64/ptrace.h +++ b/include/asm-sparc64/ptrace.h @@ -102,6 +102,7 @@ do { current_thread_info()->syscall_noerror = 1; \ } while (0) #define user_mode(regs) (!((regs)->tstate & TSTATE_PRIV)) #define instruction_pointer(regs) ((regs)->tpc) +#define regs_return_value(regs) ((regs)->u_regs[UREG_I0]) #ifdef CONFIG_SMP extern unsigned long profile_pc(struct pt_regs *); #else