Commit 93be99e7 authored by Ivan Kokshaysky's avatar Ivan Kokshaysky Committed by Linus Torvalds

[PATCH] alpha: misc fixes [9/10]

Set of small fixes:
- pcibios_init() must be int;
- fls() - ctlz on ev67, generic on others. This was required for
  something several kernel releases back, now it seems to be unused.
  Anyway, it shouldn't hurt, so included here.
- missing #includes, missing #if RTC_IRQ in drivers/char/rtc.c;
- define USER_HZ;
From Jeff Wiedemeier:
- rename alpha-specific config section 'General setup' to 'System setup'
  to avoid confusion with generic 'General setup';
- fix the 'bootpfile' build.
parent 74b4e814
...@@ -20,6 +20,7 @@ BPOBJECTS = head.o bootp.o ...@@ -20,6 +20,7 @@ BPOBJECTS = head.o bootp.o
TARGETS = vmlinux.gz tools/objstrip # also needed by aboot & milo TARGETS = vmlinux.gz tools/objstrip # also needed by aboot & milo
VMLINUX = $(TOPDIR)/vmlinux VMLINUX = $(TOPDIR)/vmlinux
OBJSTRIP = tools/objstrip OBJSTRIP = tools/objstrip
LIBS := $(patsubst lib/%,$(TOPDIR)/lib/%,$(LIBS))
all: $(TARGETS) all: $(TARGETS)
@echo Ready to install kernel in $(shell pwd)/vmlinux.gz @echo Ready to install kernel in $(shell pwd)/vmlinux.gz
......
...@@ -12,7 +12,7 @@ define_bool CONFIG_GENERIC_ISA_DMA y ...@@ -12,7 +12,7 @@ define_bool CONFIG_GENERIC_ISA_DMA y
source init/Config.in source init/Config.in
mainmenu_option next_comment mainmenu_option next_comment
comment 'General setup' comment 'System setup'
choice 'Alpha system type' \ choice 'Alpha system type' \
"Generic CONFIG_ALPHA_GENERIC \ "Generic CONFIG_ALPHA_GENERIC \
......
...@@ -190,12 +190,12 @@ pcibios_align_resource(void *data, struct resource *res, ...@@ -190,12 +190,12 @@ pcibios_align_resource(void *data, struct resource *res,
#undef MB #undef MB
#undef GB #undef GB
static void __init static int __init
pcibios_init(void) pcibios_init(void)
{ {
if (!alpha_mv.init_pci) if (alpha_mv.init_pci)
return;
alpha_mv.init_pci(); alpha_mv.init_pci();
return 0;
} }
subsys_initcall(pcibios_init); subsys_initcall(pcibios_init);
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/smp_lock.h> #include <linux/smp_lock.h>
#include <linux/stddef.h> #include <linux/stddef.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/binfmts.h>
#include <asm/bitops.h> #include <asm/bitops.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
......
...@@ -870,7 +870,9 @@ static int __init rtc_init(void) ...@@ -870,7 +870,9 @@ static int __init rtc_init(void)
if (misc_register(&rtc_dev)) if (misc_register(&rtc_dev))
{ {
#if RTC_IRQ
free_irq(RTC_IRQ, NULL); free_irq(RTC_IRQ, NULL);
#endif
release_region(RTC_PORT(0), RTC_IO_EXTENT); release_region(RTC_PORT(0), RTC_IO_EXTENT);
return -ENODEV; return -ENODEV;
} }
......
...@@ -315,6 +315,20 @@ static inline int ffs(int word) ...@@ -315,6 +315,20 @@ static inline int ffs(int word)
return word ? result+1 : 0; return word ? result+1 : 0;
} }
/*
* fls: find last bit set.
*/
#if defined(__alpha_cix__) && defined(__alpha_fix__)
static inline int fls(int word)
{
long result;
__asm__("ctlz %1,%0" : "=r"(result) : "r"(word & 0xffffffff));
return 64 - result;
}
#else
#define fls generic_fls
#endif
/* Compute powers of two for the given integer. */ /* Compute powers of two for the given integer. */
static inline int floor_log2(unsigned long word) static inline int floor_log2(unsigned long word)
{ {
......
...@@ -15,6 +15,8 @@ ...@@ -15,6 +15,8 @@
# endif # endif
#endif #endif
#define USER_HZ HZ
#define EXEC_PAGESIZE 8192 #define EXEC_PAGESIZE 8192
#ifndef NGROUPS #ifndef NGROUPS
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#define _ALPHA_PGALLOC_H #define _ALPHA_PGALLOC_H
#include <linux/config.h> #include <linux/config.h>
#include <linux/mm.h>
/* /*
* Allocate and free page tables. The xxx_kernel() versions are * Allocate and free page tables. The xxx_kernel() versions are
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment