From b3dd5b82560eef53a537e409f50261d0b33c75ce Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Tue, 12 Feb 2008 22:08:55 -0800 Subject: [SPARC]: Use shorter form of "get_zeroed_page". Signed-off-by: Robert P. J. Day Signed-off-by: David S. Miller --- arch/sparc/mm/sun4c.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/sparc/mm/sun4c.c b/arch/sparc/mm/sun4c.c index c0442e8c4b1..2375fe9dc31 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; } -- cgit v1.2.3 From b83ebf566b64d3702c6b50dbee2052623cd55ce5 Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Tue, 12 Feb 2008 22:09:29 -0800 Subject: [SPARC64]: Use shorter "get_zeroed_page" call. Signed-off-by: Robert P. J. Day Signed-off-by: David S. Miller --- arch/sparc64/kernel/iommu.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/sparc64/kernel/iommu.c b/arch/sparc64/kernel/iommu.c index d3276ebcfb4..0e347ff812a 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. */ -- cgit v1.2.3 From 0f78e7542e94e8f64ed393289d7bfac032634620 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Wed, 13 Feb 2008 01:00:26 -0800 Subject: [SPARC64]: Remove DEBUG_BOOTMEM. We'll replace it in the future with better logging facilities that can be enabled at run time. Signed-off-by: David S. Miller --- arch/sparc64/Kconfig.debug | 4 ---- arch/sparc64/defconfig | 1 - arch/sparc64/mm/init.c | 43 +------------------------------------------ 3 files changed, 1 insertion(+), 47 deletions(-) (limited to 'arch') diff --git a/arch/sparc64/Kconfig.debug b/arch/sparc64/Kconfig.debug index a5faa3683bd..6a4d28a4076 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/defconfig b/arch/sparc64/defconfig index 833d74b2b19..50dc0905578 100644 --- a/arch/sparc64/defconfig +++ b/arch/sparc64/defconfig @@ -1396,7 +1396,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/mm/init.c b/arch/sparc64/mm/init.c index e726c45645f..035c73243ad 100644 --- a/arch/sparc64/mm/init.c +++ b/arch/sparc64/mm/init.c @@ -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); } @@ -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. */ -- cgit v1.2.3 From 54cd6ddec77b75e6926d73d263aec72255b24030 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 14 Feb 2008 00:37:21 -0800 Subject: [SPARC64]: Remove Makefile code for ancient gcc and binutils. The kernel hasn't supported the compilers which need these tests for years. Signed-off-by: David S. Miller --- arch/sparc64/Makefile | 35 ++++------------------------------- 1 file changed, 4 insertions(+), 31 deletions(-) (limited to 'arch') diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile index 01159cb5f16..848e33410b4 100644 --- a/arch/sparc64/Makefile +++ b/arch/sparc64/Makefile @@ -12,39 +12,12 @@ 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_AFLAGS += -m64 -mcpu=ultrasparc -Wa,--undeclared-regs ifeq ($(CONFIG_MCOUNT),y) KBUILD_CFLAGS += -pg -- cgit v1.2.3 From 966d905634de4433cea465fdcea19503c4ae260f Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Thu, 14 Feb 2008 00:58:44 -0800 Subject: [SPARC64]: Add -mtune=ultrasparc3 if possible. This gives better heuristics for the cost of a multiply (fixed 5 cycles), rather than the 'ultrasparc' setting (variable, and unpredictable if the second argument is non-constant). Example code size savings: text data bss dec hex filename 3823690 304040 448880 4576610 45d562 vmlinux 3824521 304040 448880 4577441 45d8a1 vmlinux.orig Signed-off-by: David S. Miller --- arch/sparc64/Makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/sparc64/Makefile b/arch/sparc64/Makefile index 848e33410b4..f0c22f82698 100644 --- a/arch/sparc64/Makefile +++ b/arch/sparc64/Makefile @@ -17,6 +17,7 @@ LDFLAGS := -m elf64_sparc 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) -- cgit v1.2.3 From f6095a5176e17b510235e80ecfb542eaee6e5666 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Sun, 17 Feb 2008 22:44:32 -0800 Subject: [SPARC64]: Update defconfig. Signed-off-by: David S. Miller --- arch/sparc64/defconfig | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'arch') diff --git a/arch/sparc64/defconfig b/arch/sparc64/defconfig index 50dc0905578..250958d1e3c 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 -- cgit v1.2.3 From 3c62a2d3477ff7725210db57aec3d2806fa10c20 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Sun, 17 Feb 2008 23:22:50 -0800 Subject: [SPARC64]: Always register a PROM based early console. Signed-off-by: David S. Miller --- arch/sparc64/kernel/prom.c | 1 - arch/sparc64/kernel/setup.c | 14 +++++++------- arch/sparc64/mm/init.c | 6 +++--- 3 files changed, 10 insertions(+), 11 deletions(-) (limited to 'arch') diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c index a246e962e5a..68964ddcde1 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 5964d8653ad..ebad74bd88b 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c @@ -83,10 +83,10 @@ unsigned int boot_flags = 0; /* 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, }; @@ -112,8 +112,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. */ @@ -296,6 +295,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 +309,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/mm/init.c b/arch/sparc64/mm/init.c index 035c73243ad..9e6bca266d8 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) @@ -1414,7 +1414,7 @@ void __init paging_init(void) zholes_size); } - prom_printf("Booting Linux...\n"); + printk("Booting Linux...\n"); central_probe(); cpu_probe(); -- cgit v1.2.3 From cbc9fc5dec60f84b62e0144165c545abd24847c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Sun, 17 Feb 2008 23:24:10 -0800 Subject: [SPARC64] arch/sparc64/kernel/unaligned.c: Use time_* macros MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The functions time_before, time_before_eq, time_after, and time_after_eq are more robust for comparing jiffies against other values. So following patch implements usage of the time_after() macro, defined at linux/jiffies.h, which deals with wrapping correctly Signed-off-by: S.Çağlar Onur Signed-off-by: David S. Miller --- arch/sparc64/kernel/unaligned.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/sparc64/kernel/unaligned.c b/arch/sparc64/kernel/unaligned.c index dc7bf1b6321..1a511e9f0d3 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; -- cgit v1.2.3 From a3d41704d4647abfc2796e9c81f71e0902f78e09 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 18 Feb 2008 15:13:48 -0800 Subject: [SPARC64]: Kill unused function 'kernel_enter_debugger'. Signed-off-by: David S. Miller --- arch/sparc64/kernel/setup.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'arch') diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index ebad74bd88b..e6b57ba2b74 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c @@ -90,11 +90,6 @@ static struct console prom_early_console = { .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. -- cgit v1.2.3 From 9a2f258ad5910c478a5c98989b9a26268b2e5488 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 18 Feb 2008 15:16:20 -0800 Subject: [SPARC64]: Delete 'boot_flags'. It is write-only, nothing tests it's value. Signed-off-by: David S. Miller --- arch/sparc64/kernel/setup.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'arch') diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index e6b57ba2b74..9b892ff4e8e 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c @@ -77,9 +77,6 @@ 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; @@ -98,8 +95,6 @@ static void __init process_switch(char c) { switch (c) { case 'd': - boot_flags |= BOOTME_DEBUG; - break; case 's': break; case 'h': -- cgit v1.2.3 From 1d5509aa6985b256a426e67ae6952fd4b7664de7 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 18 Feb 2008 15:17:58 -0800 Subject: [SPARC]: Kill extern decl of 'panic_setup'. This was made static in kernel/panic.c a long time ago. Signed-off-by: David S. Miller --- arch/sparc/kernel/setup.c | 1 - arch/sparc64/kernel/setup.c | 2 -- 2 files changed, 3 deletions(-) (limited to 'arch') diff --git a/arch/sparc/kernel/setup.c b/arch/sparc/kernel/setup.c index 3cf78f16084..5f1508eeb84 100644 --- a/arch/sparc/kernel/setup.c +++ b/arch/sparc/kernel/setup.c @@ -191,7 +191,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/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index 9b892ff4e8e..82b4d091e4f 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c @@ -157,8 +157,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; -- cgit v1.2.3 From 101788b0ab5464cf485c5d434ac30563e6f9e5fe Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 18 Feb 2008 15:21:30 -0800 Subject: [SPARC64]: Kill 'prom_keyboard'. Nothing ever sets it, so it just takes up space. Signed-off-by: David S. Miller --- arch/sparc64/kernel/process.c | 7 ------- arch/sparc64/kernel/setup.c | 1 - 2 files changed, 8 deletions(-) (limited to 'arch') diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c index 1b237917498..d7e8e80d43a 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c @@ -114,15 +114,12 @@ 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!"); } @@ -132,8 +129,6 @@ 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!"); } @@ -147,8 +142,6 @@ void machine_restart(char * cmd) 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/setup.c b/arch/sparc64/kernel/setup.c index 82b4d091e4f..577c823b052 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c @@ -69,7 +69,6 @@ struct screen_info screen_info = { }; void (*prom_palette)(int); -void (*prom_keyboard)(void); static void prom_console_write(struct console *con, const char *s, unsigned n) -- cgit v1.2.3 From 667bc389c716389795c6cfa145ab5ef6279fbb62 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 18 Feb 2008 15:28:16 -0800 Subject: [SPARC]: Kill 'prom_palette'. The idea of this thing is we could save/restore the firmware's palette when breaking in and out of the firmware prompt. Only one driver implemented this (atyfb) and it's value is questionable. If you're just debugging you don't really care that the characters end up being purple or whatever. And we can provide better debugging and firmware command facilities with minimal in-kernel console I/O drivers. Signed-off-by: David S. Miller --- arch/sparc/kernel/process.c | 6 ------ arch/sparc/kernel/setup.c | 3 --- arch/sparc/prom/misc.c | 7 ------- arch/sparc64/kernel/process.c | 8 -------- arch/sparc64/kernel/setup.c | 2 -- arch/sparc64/kernel/sparc64_ksyms.c | 3 --- arch/sparc64/prom/misc.c | 9 --------- 7 files changed, 38 deletions(-) (limited to 'arch') diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c index 19186ce8850..0bd69d0b5cd 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 5f1508eeb84..3c13137685d 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) { diff --git a/arch/sparc/prom/misc.c b/arch/sparc/prom/misc.c index 37cff5f5470..d9fb3af41c1 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/kernel/process.c b/arch/sparc64/kernel/process.c index d7e8e80d43a..6eceac51ae6 100644 --- a/arch/sparc64/kernel/process.c +++ b/arch/sparc64/kernel/process.c @@ -113,13 +113,9 @@ void cpu_idle(void) extern char reboot_command []; -extern void (*prom_palette)(int); - void machine_halt(void) { sstate_halt(); - if (prom_palette) - prom_palette (1); prom_halt(); panic("Halt failed!"); } @@ -127,8 +123,6 @@ void machine_halt(void) void machine_alt_power_off(void) { sstate_poweroff(); - if (prom_palette) - prom_palette(1); prom_halt_power_off(); panic("Power-off failed!"); } @@ -140,8 +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 (cmd) prom_reboot(cmd); if (*reboot_command) diff --git a/arch/sparc64/kernel/setup.c b/arch/sparc64/kernel/setup.c index 577c823b052..d036dbe7286 100644 --- a/arch/sparc64/kernel/setup.c +++ b/arch/sparc64/kernel/setup.c @@ -68,8 +68,6 @@ struct screen_info screen_info = { 16 /* orig-video-points */ }; -void (*prom_palette)(int); - static void prom_console_write(struct console *con, const char *s, unsigned n) { diff --git a/arch/sparc64/kernel/sparc64_ksyms.c b/arch/sparc64/kernel/sparc64_ksyms.c index 68db0893039..51fa773f38c 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/prom/misc.c b/arch/sparc64/prom/misc.c index bbec7522826..47a877a15ab 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); } -- cgit v1.2.3 From 8c5b4a3f43c060662d83574a4c85fbb362419ddd Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Mon, 18 Feb 2008 16:40:10 -0800 Subject: [SPARC64]: Kill pcic_present(). And also it's helper function pci_is_controller(). Both are unused. I can't remove the equivalent from sparc32 yet as some ancient bus probing code still uses that platform's version. Signed-off-by: David S. Miller --- arch/sparc64/kernel/pci.c | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'arch') diff --git a/arch/sparc64/kernel/pci.c b/arch/sparc64/kernel/pci.c index a61c38fe75e..545356b00e2 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 -- cgit v1.2.3