summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2002-08-15 09:32:42 +1000
committerAnton Blanchard <anton@samba.org>2002-08-15 09:32:42 +1000
commitedb74dc60a0ac756495de1d9a3bd4b586ae8a892 (patch)
tree392f8e8eaec30edb2b35ae4a0b94fde9fbd40e46 /include
parent949341959ef8295f3683a991452338f6c5c35335 (diff)
parent456f17cd1a2873b3e83cee85bcb30708037cb4e8 (diff)
Merge samba.org:/scratch/anton/linux-2.5
into samba.org:/scratch/anton/linux-2.5_work
Diffstat (limited to 'include')
-rw-r--r--include/asm-alpha/rtc.h10
-rw-r--r--include/asm-generic/percpu.h27
-rw-r--r--include/asm-generic/rtc.h211
-rw-r--r--include/asm-i386/rtc.h10
-rw-r--r--include/asm-ia64/percpu.h12
-rw-r--r--include/asm-ia64/processor.h8
-rw-r--r--include/asm-parisc/rtc.h131
-rw-r--r--include/asm-ppc/rtc.h95
-rw-r--r--include/asm-x86_64/percpu.h2
-rw-r--r--include/linux/apm_bios.h3
-rw-r--r--include/linux/fb.h10
-rw-r--r--include/linux/fs.h1
-rw-r--r--include/linux/init_task.h120
-rw-r--r--include/linux/percpu.h13
-rw-r--r--include/linux/rtc.h26
-rw-r--r--include/linux/sched.h5
-rw-r--r--include/linux/smp.h3
-rw-r--r--include/linux/stringify.h4
-rw-r--r--include/linux/sunrpc/svcsock.h1
-rw-r--r--include/linux/usb.h53
-rw-r--r--include/linux/vmalloc.h57
-rw-r--r--include/linux/wait.h10
-rw-r--r--include/video/fbcon.h7
23 files changed, 675 insertions, 144 deletions
diff --git a/include/asm-alpha/rtc.h b/include/asm-alpha/rtc.h
new file mode 100644
index 000000000000..4e854b1333eb
--- /dev/null
+++ b/include/asm-alpha/rtc.h
@@ -0,0 +1,10 @@
+#ifndef _ALPHA_RTC_H
+#define _ALPHA_RTC_H
+
+/*
+ * Alpha uses the default access methods for the RTC.
+ */
+
+#include <asm-generic/rtc.h>
+
+#endif
diff --git a/include/asm-generic/percpu.h b/include/asm-generic/percpu.h
index 0ad91ae08c6b..4dcfdb73fb07 100644
--- a/include/asm-generic/percpu.h
+++ b/include/asm-generic/percpu.h
@@ -1,13 +1,34 @@
#ifndef _ASM_GENERIC_PERCPU_H_
#define _ASM_GENERIC_PERCPU_H_
+#include <linux/compiler.h>
#define __GENERIC_PER_CPU
-#include <linux/compiler.h>
+#ifdef CONFIG_SMP
extern unsigned long __per_cpu_offset[NR_CPUS];
+/* Separate out the type, so (int[3], foo) works. */
+#ifndef MODULE
+#define DEFINE_PER_CPU(type, name) \
+ __attribute__((__section__(".percpu"))) __typeof__(type) name##__per_cpu
+#endif
+
/* var is in discarded region: offset to particular copy we want */
-#define per_cpu(var, cpu) (*RELOC_HIDE(&var, __per_cpu_offset[cpu]))
-#define this_cpu(var) per_cpu(var, smp_processor_id())
+#define per_cpu(var, cpu) (*RELOC_HIDE(&var##__per_cpu, __per_cpu_offset[cpu]))
+#define __get_cpu_var(var) per_cpu(var, smp_processor_id())
+
+#else /* ! SMP */
+
+/* Can't define per-cpu variables in modules. Sorry --RR */
+#ifndef MODULE
+#define DEFINE_PER_CPU(type, name) \
+ __typeof__(type) name##__per_cpu
+#endif
+
+#define per_cpu(var, cpu) var##__per_cpu
+#define __get_cpu_var(var) var##__per_cpu
+#endif
+
+#define DECLARE_PER_CPU(type, name) extern __typeof__(type) name##__per_cpu
#endif /* _ASM_GENERIC_PERCPU_H_ */
diff --git a/include/asm-generic/rtc.h b/include/asm-generic/rtc.h
new file mode 100644
index 000000000000..ebdeefd49822
--- /dev/null
+++ b/include/asm-generic/rtc.h
@@ -0,0 +1,211 @@
+/*
+ * inclue/asm-generic/rtc.h
+ *
+ * Author: Tom Rini <trini@mvista.com>
+ *
+ * Based on:
+ * drivers/char/rtc.c
+ *
+ * Please read the COPYING file for all license details.
+ */
+
+#ifndef __ASM_RTC_H__
+#define __ASM_RTC_H__
+
+#ifdef __KERNEL__
+
+#include <linux/mc146818rtc.h>
+#include <linux/rtc.h>
+
+#define RTC_PIE 0x40 /* periodic interrupt enable */
+#define RTC_AIE 0x20 /* alarm interrupt enable */
+#define RTC_UIE 0x10 /* update-finished interrupt enable */
+
+extern void gen_rtc_interrupt(unsigned long);
+
+/* some dummy definitions */
+#define RTC_SQWE 0x08 /* enable square-wave output */
+#define RTC_DM_BINARY 0x04 /* all time/date values are BCD if clear */
+#define RTC_24H 0x02 /* 24 hour mode - else hours bit 7 means pm */
+#define RTC_DST_EN 0x01 /* auto switch DST - works f. USA only */
+
+/*
+ * Returns true if a clock update is in progress
+ */
+static inline unsigned char rtc_is_updating(void)
+{
+ unsigned char uip;
+
+ spin_lock_irq(&rtc_lock);
+ uip = (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP);
+ spin_unlock_irq(&rtc_lock);
+ return uip;
+}
+
+static inline void get_rtc_time(struct rtc_time *time)
+{
+ unsigned long uip_watchdog = jiffies;
+ unsigned char ctrl;
+#ifdef CONFIG_DECSTATION
+ unsigned int real_year;
+#endif
+
+ /*
+ * read RTC once any update in progress is done. The update
+ * can take just over 2ms. We wait 10 to 20ms. There is no need to
+ * to poll-wait (up to 1s - eeccch) for the falling edge of RTC_UIP.
+ * If you need to know *exactly* when a second has started, enable
+ * periodic update complete interrupts, (via ioctl) and then
+ * immediately read /dev/rtc which will block until you get the IRQ.
+ * Once the read clears, read the RTC time (again via ioctl). Easy.
+ */
+
+ if (rtc_is_updating() != 0)
+ while (jiffies - uip_watchdog < 2*HZ/100) {
+ barrier();
+ cpu_relax();
+ }
+
+ /*
+ * Only the values that we read from the RTC are set. We leave
+ * tm_wday, tm_yday and tm_isdst untouched. Even though the
+ * RTC has RTC_DAY_OF_WEEK, we ignore it, as it is only updated
+ * by the RTC when initially set to a non-zero value.
+ */
+ spin_lock_irq(&rtc_lock);
+ time->tm_sec = CMOS_READ(RTC_SECONDS);
+ time->tm_min = CMOS_READ(RTC_MINUTES);
+ time->tm_hour = CMOS_READ(RTC_HOURS);
+ time->tm_mday = CMOS_READ(RTC_DAY_OF_MONTH);
+ time->tm_mon = CMOS_READ(RTC_MONTH);
+ time->tm_year = CMOS_READ(RTC_YEAR);
+#ifdef CONFIG_DECSTATION
+ real_year = CMOS_READ(RTC_DEC_YEAR);
+#endif
+ ctrl = CMOS_READ(RTC_CONTROL);
+ spin_unlock_irq(&rtc_lock);
+
+ if (!(ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
+ {
+ BCD_TO_BIN(time->tm_sec);
+ BCD_TO_BIN(time->tm_min);
+ BCD_TO_BIN(time->tm_hour);
+ BCD_TO_BIN(time->tm_mday);
+ BCD_TO_BIN(time->tm_mon);
+ BCD_TO_BIN(time->tm_year);
+ }
+
+#ifdef CONFIG_DECSTATION
+ time->tm_year += real_year - 72;
+#endif
+
+ /*
+ * Account for differences between how the RTC uses the values
+ * and how they are defined in a struct rtc_time;
+ */
+ if (time->tm_year <= 69)
+ time->tm_year += 100;
+
+ time->tm_mon--;
+}
+
+/* Set the current date and time in the real time clock. */
+static inline int set_rtc_time(struct rtc_time *time)
+{
+ unsigned char mon, day, hrs, min, sec;
+ unsigned char save_control, save_freq_select;
+ unsigned int yrs;
+#ifdef CONFIG_DECSTATION
+ unsigned int real_yrs, leap_yr;
+#endif
+
+ yrs = time->tm_year;
+ mon = time->tm_mon + 1; /* tm_mon starts at zero */
+ day = time->tm_mday;
+ hrs = time->tm_hour;
+ min = time->tm_min;
+ sec = time->tm_sec;
+
+ if (yrs > 255) /* They are unsigned */
+ return -EINVAL;
+
+ spin_lock_irq(&rtc_lock);
+#ifdef CONFIG_DECSTATION
+ real_yrs = yrs;
+ leap_yr = ((!((yrs + 1900) % 4) && ((yrs + 1900) % 100)) ||
+ !((yrs + 1900) % 400));
+ yrs = 72;
+
+ /*
+ * We want to keep the year set to 73 until March
+ * for non-leap years, so that Feb, 29th is handled
+ * correctly.
+ */
+ if (!leap_yr && mon < 3) {
+ real_yrs--;
+ yrs = 73;
+ }
+#endif
+ /* These limits and adjustments are independant of
+ * whether the chip is in binary mode or not.
+ */
+ if (yrs > 169) {
+ spin_unlock_irq(&rtc_lock);
+ return -EINVAL;
+ }
+
+ if (yrs >= 100)
+ yrs -= 100;
+
+ if (!(CMOS_READ(RTC_CONTROL) & RTC_DM_BINARY)
+ || RTC_ALWAYS_BCD) {
+ BIN_TO_BCD(sec);
+ BIN_TO_BCD(min);
+ BIN_TO_BCD(hrs);
+ BIN_TO_BCD(day);
+ BIN_TO_BCD(mon);
+ BIN_TO_BCD(yrs);
+ }
+
+ save_control = CMOS_READ(RTC_CONTROL);
+ CMOS_WRITE((save_control|RTC_SET), RTC_CONTROL);
+ save_freq_select = CMOS_READ(RTC_FREQ_SELECT);
+ CMOS_WRITE((save_freq_select|RTC_DIV_RESET2), RTC_FREQ_SELECT);
+
+#ifdef CONFIG_DECSTATION
+ CMOS_WRITE(real_yrs, RTC_DEC_YEAR);
+#endif
+ CMOS_WRITE(yrs, RTC_YEAR);
+ CMOS_WRITE(mon, RTC_MONTH);
+ CMOS_WRITE(day, RTC_DAY_OF_MONTH);
+ CMOS_WRITE(hrs, RTC_HOURS);
+ CMOS_WRITE(min, RTC_MINUTES);
+ CMOS_WRITE(sec, RTC_SECONDS);
+
+ CMOS_WRITE(save_control, RTC_CONTROL);
+ CMOS_WRITE(save_freq_select, RTC_FREQ_SELECT);
+
+ spin_unlock_irq(&rtc_lock);
+
+ return 0;
+}
+
+static inline unsigned int get_rtc_ss(void)
+{
+ struct rtc_time h;
+
+ get_rtc_time(&h);
+ return h.tm_sec;
+}
+
+static inline int get_rtc_pll(struct rtc_pll_info *pll)
+{
+ return -EINVAL;
+}
+static inline int set_rtc_pll(struct rtc_pll_info *pll)
+{
+ return -EINVAL;
+}
+
+#endif /* __KERNEL__ */
+#endif /* __ASM_RTC_H__ */
diff --git a/include/asm-i386/rtc.h b/include/asm-i386/rtc.h
new file mode 100644
index 000000000000..ffd02109a0e5
--- /dev/null
+++ b/include/asm-i386/rtc.h
@@ -0,0 +1,10 @@
+#ifndef _I386_RTC_H
+#define _I386_RTC_H
+
+/*
+ * x86 uses the default access methods for the RTC.
+ */
+
+#include <asm-generic/rtc.h>
+
+#endif
diff --git a/include/asm-ia64/percpu.h b/include/asm-ia64/percpu.h
index 7f2871a8cc61..7f404b6db853 100644
--- a/include/asm-ia64/percpu.h
+++ b/include/asm-ia64/percpu.h
@@ -8,7 +8,7 @@
#ifdef __ASSEMBLY__
-#define THIS_CPU(var) (var) /* use this to mark accesses to per-CPU variables... */
+#define THIS_CPU(var) (var##__per_cpu) /* use this to mark accesses to per-CPU variables... */
#else /* !__ASSEMBLY__ */
@@ -16,8 +16,14 @@
extern unsigned long __per_cpu_offset[NR_CPUS];
-#define per_cpu(var, cpu) (*(__typeof__(&(var))) ((void *) &(var) + __per_cpu_offset[cpu]))
-#define this_cpu(var) (var)
+#ifndef MODULE
+#define DEFINE_PER_CPU(type, name) \
+ __attribute__((__section__(".data.percpu"))) __typeof__(type) name##__per_cpu
+#endif
+#define DECLARE_PER_CPU(type, name) extern __typeof__(type) name##__per_cpu
+
+#define per_cpu(var, cpu) (*RELOC_HIDE(&var##__per_cpu, __per_cpu_offset[cpu]))
+#define __get_cpu_var(var) (var##__per_cpu)
#endif /* !__ASSEMBLY__ */
diff --git a/include/asm-ia64/processor.h b/include/asm-ia64/processor.h
index 51993a853ac5..cd1be7a72902 100644
--- a/include/asm-ia64/processor.h
+++ b/include/asm-ia64/processor.h
@@ -134,7 +134,7 @@ struct ia64_psr {
* CPU type, hardware bug flags, and per-CPU state. Frequently used
* state comes earlier:
*/
-extern struct cpuinfo_ia64 {
+struct cpuinfo_ia64 {
/* irq_stat must be 64-bit aligned */
union {
struct {
@@ -175,13 +175,15 @@ extern struct cpuinfo_ia64 {
__u64 prof_counter;
__u64 prof_multiplier;
#endif
-} cpu_info __per_cpu_data;
+};
+
+DECLARE_PER_CPU(struct cpuinfo_ia64, cpu_info);
/*
* The "local" data pointer. It points to the per-CPU data of the currently executing
* CPU, much like "current" points to the per-task data of the currently executing task.
*/
-#define local_cpu_data (&this_cpu(cpu_info))
+#define local_cpu_data (&__get_cpu_var(cpu_info))
#define cpu_data(cpu) (&per_cpu(cpu_info, cpu))
extern void identify_cpu (struct cpuinfo_ia64 *);
diff --git a/include/asm-parisc/rtc.h b/include/asm-parisc/rtc.h
new file mode 100644
index 000000000000..a639c86f83d1
--- /dev/null
+++ b/include/asm-parisc/rtc.h
@@ -0,0 +1,131 @@
+/*
+ * inclue/asm-parisc/rtc.h
+ *
+ * Copyright 2002 Randolph CHung <tausq@debian.org>
+ *
+ * Based on: include/asm-ppc/rtc.h and the genrtc driver in the
+ * 2.4 parisc linux tree
+ */
+
+#ifndef __ASM_RTC_H__
+#define __ASM_RTC_H__
+
+#ifdef __KERNEL__
+
+#include <linux/rtc.h>
+
+#include <asm/pdc.h>
+
+#define SECS_PER_HOUR (60 * 60)
+#define SECS_PER_DAY (SECS_PER_HOUR * 24)
+
+
+#define RTC_PIE 0x40 /* periodic interrupt enable */
+#define RTC_AIE 0x20 /* alarm interrupt enable */
+#define RTC_UIE 0x10 /* update-finished interrupt enable */
+
+extern void gen_rtc_interrupt(unsigned long);
+
+/* some dummy definitions */
+#define RTC_SQWE 0x08 /* enable square-wave output */
+#define RTC_DM_BINARY 0x04 /* all time/date values are BCD if clear */
+#define RTC_24H 0x02 /* 24 hour mode - else hours bit 7 means pm */
+#define RTC_DST_EN 0x01 /* auto switch DST - works f. USA only */
+
+# define __isleap(year) \
+ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
+
+/* How many days come before each month (0-12). */
+static const unsigned short int __mon_yday[2][13] =
+{
+ /* Normal years. */
+ { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
+ /* Leap years. */
+ { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
+};
+
+static int get_rtc_time(struct rtc_time *wtime)
+{
+ struct pdc_tod tod_data;
+ long int days, rem, y;
+ const unsigned short int *ip;
+
+ if(pdc_tod_read(&tod_data) < 0)
+ return -1;
+
+
+ // most of the remainder of this function is:
+// Copyright (C) 1991, 1993, 1997, 1998 Free Software Foundation, Inc.
+// This was originally a part of the GNU C Library.
+// It is distributed under the GPL, and was swiped from offtime.c
+
+
+ days = tod_data.tod_sec / SECS_PER_DAY;
+ rem = tod_data.tod_sec % SECS_PER_DAY;
+
+ wtime->tm_hour = rem / SECS_PER_HOUR;
+ rem %= SECS_PER_HOUR;
+ wtime->tm_min = rem / 60;
+ wtime->tm_sec = rem % 60;
+
+ y = 1970;
+
+#define DIV(a, b) ((a) / (b) - ((a) % (b) < 0))
+#define LEAPS_THRU_END_OF(y) (DIV (y, 4) - DIV (y, 100) + DIV (y, 400))
+
+ while (days < 0 || days >= (__isleap (y) ? 366 : 365))
+ {
+ /* Guess a corrected year, assuming 365 days per year. */
+ long int yg = y + days / 365 - (days % 365 < 0);
+
+ /* Adjust DAYS and Y to match the guessed year. */
+ days -= ((yg - y) * 365
+ + LEAPS_THRU_END_OF (yg - 1)
+ - LEAPS_THRU_END_OF (y - 1));
+ y = yg;
+ }
+ wtime->tm_year = y - 1900;
+
+ ip = __mon_yday[__isleap(y)];
+ for (y = 11; days < (long int) ip[y]; --y)
+ continue;
+ days -= ip[y];
+ wtime->tm_mon = y;
+ wtime->tm_mday = days + 1;
+
+ return 0;
+}
+
+static int set_rtc_time(struct rtc_time *wtime)
+{
+ u_int32_t secs;
+
+ secs = mktime(wtime->tm_year + 1900, wtime->tm_mon + 1, wtime->tm_mday,
+ wtime->tm_hour, wtime->tm_min, wtime->tm_sec);
+
+ if(pdc_tod_set(secs, 0) < 0)
+ return -1;
+ else
+ return 0;
+
+}
+
+static inline unsigned int get_rtc_ss(void)
+{
+ struct rtc_time h;
+
+ get_rtc_time(&h);
+ return h.tm_sec;
+}
+
+static inline int get_rtc_pll(struct rtc_pll_info *pll)
+{
+ return -EINVAL;
+}
+static inline int set_rtc_pll(struct rtc_pll_info *pll)
+{
+ return -EINVAL;
+}
+
+#endif /* __KERNEL__ */
+#endif /* __ASM_RTC_H__ */
diff --git a/include/asm-ppc/rtc.h b/include/asm-ppc/rtc.h
new file mode 100644
index 000000000000..72b164039fe6
--- /dev/null
+++ b/include/asm-ppc/rtc.h
@@ -0,0 +1,95 @@
+/*
+ * inclue/asm-ppc/rtc.h
+ *
+ * Copyright 2002 MontaVista Software Inc.
+ * Author: Tom Rini <trini@mvista.com>
+ *
+ * Based on:
+ * include/asm-m68k/rtc.h
+ *
+ * Copyright Richard Zidlicky
+ * implementation details for genrtc/q40rtc driver
+ *
+ * And the old drivers/macintosh/rtc.c which was heavily based on:
+ * Linux/SPARC Real Time Clock Driver
+ * Copyright (C) 1996 Thomas K. Dyas (tdyas@eden.rutgers.edu)
+ *
+ * With additional work by Paul Mackerras and Franz Sirl.
+ */
+/* permission is hereby granted to copy, modify and redistribute this code
+ * in terms of the GNU Library General Public License, Version 2 or later,
+ * at your option.
+ */
+
+#ifndef __ASM_RTC_H__
+#define __ASM_RTC_H__
+
+#ifdef __KERNEL__
+
+#include <linux/rtc.h>
+
+#include <asm/machdep.h>
+#include <asm/time.h>
+
+#define RTC_PIE 0x40 /* periodic interrupt enable */
+#define RTC_AIE 0x20 /* alarm interrupt enable */
+#define RTC_UIE 0x10 /* update-finished interrupt enable */
+
+extern void gen_rtc_interrupt(unsigned long);
+
+/* some dummy definitions */
+#define RTC_SQWE 0x08 /* enable square-wave output */
+#define RTC_DM_BINARY 0x04 /* all time/date values are BCD if clear */
+#define RTC_24H 0x02 /* 24 hour mode - else hours bit 7 means pm */
+#define RTC_DST_EN 0x01 /* auto switch DST - works f. USA only */
+
+static inline void get_rtc_time(struct rtc_time *time)
+{
+ if (ppc_md.get_rtc_time) {
+ unsigned long nowtime;
+
+ nowtime = (ppc_md.get_rtc_time)();
+
+ to_tm(nowtime, time);
+
+ time->tm_year -= 1900;
+ time->tm_mon -= 1; /* Make sure userland has a 0-based month */
+ }
+}
+
+/* Set the current date and time in the real time clock. */
+static inline void set_rtc_time(struct rtc_time *time)
+{
+ if (ppc_md.get_rtc_time) {
+ unsigned long nowtime;
+
+ nowtime = mktime(time->tm_year+1900, time->tm_mon+1,
+ time->tm_mday, time->tm_hour, time->tm_min,
+ time->tm_sec);
+
+ (ppc_md.set_rtc_time)(nowtime);
+
+ return 0;
+ } else
+ return -EINVAL;
+}
+
+static inline unsigned int get_rtc_ss(void)
+{
+ struct rtc_time h;
+
+ get_rtc_time(&h);
+ return h.tm_sec;
+}
+
+static inline int get_rtc_pll(struct rtc_pll_info *pll)
+{
+ return -EINVAL;
+}
+static inline int set_rtc_pll(struct rtc_pll_info *pll)
+{
+ return -EINVAL;
+}
+
+#endif /* __KERNEL__ */
+#endif /* __ASM_RTC_H__ */
diff --git a/include/asm-x86_64/percpu.h b/include/asm-x86_64/percpu.h
index 01905126bfbc..bb91d49f92f3 100644
--- a/include/asm-x86_64/percpu.h
+++ b/include/asm-x86_64/percpu.h
@@ -4,7 +4,7 @@
#include <asm/pda.h>
/* var is in discarded region: offset to particular copy we want */
-#define this_cpu(var) (*RELOC_HIDE(&var, read_pda(cpudata_offset)))
+#define __get_cpu_var(var) (*RELOC_HIDE(&var, read_pda(cpudata_offset)))
#define per_cpu(var, cpu) (*RELOC_HIDE(&var, per_cpu_pda[cpu]))
void setup_per_cpu_areas(void);
diff --git a/include/linux/apm_bios.h b/include/linux/apm_bios.h
index 732fbff874cc..ceffd587b7a8 100644
--- a/include/linux/apm_bios.h
+++ b/include/linux/apm_bios.h
@@ -21,8 +21,7 @@ typedef unsigned short apm_eventinfo_t;
#ifdef __KERNEL__
-#define APM_40 (GDT_ENTRY_APMBIOS_BASE * 8)
-#define APM_CS (APM_BASE + 8)
+#define APM_CS (GDT_ENTRY_APMBIOS_BASE * 8)
#define APM_CS_16 (APM_CS + 8)
#define APM_DS (APM_CS_16 + 8)
diff --git a/include/linux/fb.h b/include/linux/fb.h
index 0340aa886918..0fd013774ac7 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -316,12 +316,6 @@ struct fb_ops {
struct module *owner;
int (*fb_open)(struct fb_info *info, int user);
int (*fb_release)(struct fb_info *info, int user);
- /* get non settable parameters */
- int (*fb_get_fix)(struct fb_fix_screeninfo *fix, int con,
- struct fb_info *info);
- /* get settable parameters */
- int (*fb_get_var)(struct fb_var_screeninfo *var, int con,
- struct fb_info *info);
/* set settable parameters */
int (*fb_set_var)(struct fb_var_screeninfo *var, int con,
struct fb_info *info);
@@ -399,10 +393,6 @@ struct fb_info {
* `Generic' versions of the frame buffer device operations
*/
-extern int gen_get_fix(struct fb_fix_screeninfo *fix, int con,
- struct fb_info *info);
-extern int gen_get_var(struct fb_var_screeninfo *var, int con,
- struct fb_info *info);
extern int gen_set_var(struct fb_var_screeninfo *var, int con,
struct fb_info *info);
extern int gen_get_cmap(struct fb_cmap *cmap, int kspc, int con,
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 192107379fd9..ec0f6edac31b 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1241,6 +1241,7 @@ extern int generic_file_mmap(struct file *, struct vm_area_struct *);
extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
extern ssize_t generic_file_read(struct file *, char *, size_t, loff_t *);
extern ssize_t generic_file_write(struct file *, const char *, size_t, loff_t *);
+extern ssize_t generic_file_write_nolock(struct file *, const char *, size_t, loff_t *);
extern ssize_t generic_file_sendfile(struct file *, struct file *, loff_t *, size_t);
extern void do_generic_file_read(struct file *, loff_t *, read_descriptor_t *, read_actor_t);
ssize_t generic_file_direct_IO(int rw, struct inode *inode, char *buf,
diff --git a/include/linux/init_task.h b/include/linux/init_task.h
index 56c6b7181796..d023d2360a71 100644
--- a/include/linux/init_task.h
+++ b/include/linux/init_task.h
@@ -5,34 +5,34 @@
#define INIT_FILES \
{ \
- count: ATOMIC_INIT(1), \
- file_lock: RW_LOCK_UNLOCKED, \
- max_fds: NR_OPEN_DEFAULT, \
- max_fdset: __FD_SETSIZE, \
- next_fd: 0, \
- fd: &init_files.fd_array[0], \
- close_on_exec: &init_files.close_on_exec_init, \
- open_fds: &init_files.open_fds_init, \
- close_on_exec_init: { { 0, } }, \
- open_fds_init: { { 0, } }, \
- fd_array: { NULL, } \
+ .count = ATOMIC_INIT(1), \
+ .file_lock = RW_LOCK_UNLOCKED, \
+ .max_fds = NR_OPEN_DEFAULT, \
+ .max_fdset = __FD_SETSIZE, \
+ .next_fd = 0, \
+ .fd = &init_files.fd_array[0], \
+ .close_on_exec = &init_files.close_on_exec_init, \
+ .open_fds = &init_files.open_fds_init, \
+ .close_on_exec_init = { { 0, } }, \
+ .open_fds_init = { { 0, } }, \
+ .fd_array = { NULL, } \
}
#define INIT_MM(name) \
{ \
- mm_rb: RB_ROOT, \
- pgd: swapper_pg_dir, \
- mm_users: ATOMIC_INIT(2), \
- mm_count: ATOMIC_INIT(1), \
- mmap_sem: __RWSEM_INITIALIZER(name.mmap_sem), \
- page_table_lock: SPIN_LOCK_UNLOCKED, \
- mmlist: LIST_HEAD_INIT(name.mmlist), \
+ .mm_rb = RB_ROOT, \
+ .pgd = swapper_pg_dir, \
+ .mm_users = ATOMIC_INIT(2), \
+ .mm_count = ATOMIC_INIT(1), \
+ .mmap_sem = __RWSEM_INITIALIZER(name.mmap_sem), \
+ .page_table_lock = SPIN_LOCK_UNLOCKED, \
+ .mmlist = LIST_HEAD_INIT(name.mmlist), \
}
#define INIT_SIGNALS { \
- count: ATOMIC_INIT(1), \
- action: { {{0,}}, }, \
- siglock: SPIN_LOCK_UNLOCKED \
+ .count = ATOMIC_INIT(1), \
+ .action = { {{0,}}, }, \
+ .siglock = SPIN_LOCK_UNLOCKED \
}
/*
@@ -41,45 +41,45 @@
*/
#define INIT_TASK(tsk) \
{ \
- state: 0, \
- thread_info: &init_thread_info, \
- flags: 0, \
- lock_depth: -1, \
- prio: MAX_PRIO-20, \
- static_prio: MAX_PRIO-20, \
- policy: SCHED_NORMAL, \
- cpus_allowed: -1, \
- mm: NULL, \
- active_mm: &init_mm, \
- run_list: LIST_HEAD_INIT(tsk.run_list), \
- time_slice: HZ, \
- tasks: LIST_HEAD_INIT(tsk.tasks), \
- real_parent: &tsk, \
- parent: &tsk, \
- children: LIST_HEAD_INIT(tsk.children), \
- sibling: LIST_HEAD_INIT(tsk.sibling), \
- thread_group: LIST_HEAD_INIT(tsk.thread_group), \
- wait_chldexit: __WAIT_QUEUE_HEAD_INITIALIZER(tsk.wait_chldexit),\
- real_timer: { \
- function: it_real_fn \
- }, \
- cap_effective: CAP_INIT_EFF_SET, \
- cap_inheritable: CAP_INIT_INH_SET, \
- cap_permitted: CAP_FULL_SET, \
- keep_capabilities: 0, \
- rlim: INIT_RLIMITS, \
- user: INIT_USER, \
- comm: "swapper", \
- thread: INIT_THREAD, \
- fs: &init_fs, \
- files: &init_files, \
- sigmask_lock: SPIN_LOCK_UNLOCKED, \
- sig: &init_signals, \
- pending: { NULL, &tsk.pending.head, {{0}}}, \
- blocked: {{0}}, \
- alloc_lock: SPIN_LOCK_UNLOCKED, \
- switch_lock: SPIN_LOCK_UNLOCKED, \
- journal_info: NULL, \
+ .state = 0, \
+ .thread_info = &init_thread_info, \
+ .flags = 0, \
+ .lock_depth = -1, \
+ .prio = MAX_PRIO-20, \
+ .static_prio = MAX_PRIO-20, \
+ .policy = SCHED_NORMAL, \
+ .cpus_allowed = -1, \
+ .mm = NULL, \
+ .active_mm = &init_mm, \
+ .run_list = LIST_HEAD_INIT(tsk.run_list), \
+ .time_slice = HZ, \
+ .tasks = LIST_HEAD_INIT(tsk.tasks), \
+ .real_parent = &tsk, \
+ .parent = &tsk, \
+ .children = LIST_HEAD_INIT(tsk.children), \
+ .sibling = LIST_HEAD_INIT(tsk.sibling), \
+ .thread_group = LIST_HEAD_INIT(tsk.thread_group), \
+ .wait_chldexit = __WAIT_QUEUE_HEAD_INITIALIZER(tsk.wait_chldexit),\
+ .real_timer = { \
+ .function = it_real_fn \
+ }, \
+ .cap_effective = CAP_INIT_EFF_SET, \
+ .cap_inheritable = CAP_INIT_INH_SET, \
+ .cap_permitted = CAP_FULL_SET, \
+ .keep_capabilities = 0, \
+ .rlim = INIT_RLIMITS, \
+ .user = INIT_USER, \
+ .comm = "swapper", \
+ .thread = INIT_THREAD, \
+ .fs = &init_fs, \
+ .files = &init_files, \
+ .sigmask_lock = SPIN_LOCK_UNLOCKED, \
+ .sig = &init_signals, \
+ .pending = { NULL, &tsk.pending.head, {{0}}}, \
+ .blocked = {{0}}, \
+ .alloc_lock = SPIN_LOCK_UNLOCKED, \
+ .switch_lock = SPIN_LOCK_UNLOCKED, \
+ .journal_info = NULL, \
}
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index 577df0fbe10d..06ff863fbc95 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -1,14 +1,9 @@
#ifndef __LINUX_PERCPU_H
#define __LINUX_PERCPU_H
-#include <linux/config.h>
-
-#ifdef CONFIG_SMP
-#define __per_cpu_data __attribute__((section(".data.percpu")))
+#include <linux/spinlock.h> /* For preempt_disable() */
#include <asm/percpu.h>
-#else
-#define __per_cpu_data
-#define per_cpu(var, cpu) var
-#define this_cpu(var) var
-#endif
+
+#define get_cpu_var(var) ({ preempt_disable(); __get_cpu_var(var); })
+#define put_cpu_var(var) preempt_enable()
#endif /* __LINUX_PERCPU_H */
diff --git a/include/linux/rtc.h b/include/linux/rtc.h
index e99a2357ab28..33edafbe6000 100644
--- a/include/linux/rtc.h
+++ b/include/linux/rtc.h
@@ -39,10 +39,32 @@ struct rtc_wkalrm {
struct rtc_time time; /* time the alarm is set to */
};
+/*
+ * Data structure to control PLL correction some better RTC feature
+ * pll_value is used to get or set current value of correction,
+ * the rest of the struct is used to query HW capabilities.
+ * This is modeled after the RTC used in Q40/Q60 computers but
+ * should be sufficiently flexible for other devices
+ *
+ * +ve pll_value means clock will run faster by
+ * pll_value*pll_posmult/pll_clock
+ * -ve pll_value means clock will run slower by
+ * pll_value*pll_negmult/pll_clock
+ */
+
+struct rtc_pll_info {
+ int pll_ctrl; /* placeholder for fancier control */
+ int pll_value; /* get/set correction value */
+ int pll_max; /* max +ve (faster) adjustment value */
+ int pll_min; /* max -ve (slower) adjustment value */
+ int pll_posmult; /* factor for +ve corection */
+ int pll_negmult; /* factor for -ve corection */
+ long pll_clock; /* base PLL frequency */
+};
/*
* ioctl calls that are permitted to the /dev/rtc interface, if
- * CONFIG_RTC/CONFIG_EFI_RTC was enabled.
+ * any of the RTC drivers are enabled.
*/
#define RTC_AIE_ON _IO('p', 0x01) /* Alarm int. enable on */
@@ -65,6 +87,8 @@ struct rtc_wkalrm {
#define RTC_WKALM_SET _IOW('p', 0x0f, struct rtc_wkalrm)/* Set wakeup alarm*/
#define RTC_WKALM_RD _IOR('p', 0x10, struct rtc_wkalrm)/* Get wakeup alarm*/
+#define RTC_PLL_GET _IOR('p', 0x11, struct rtc_pll_info) /* Get PLL correction */
+#define RTC_PLL_SET _IOW('p', 0x12, struct rtc_pll_info) /* Set PLL correction */
#ifdef __KERNEL__
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 7adc9c6278b7..fcd107c3d29c 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -45,6 +45,10 @@ struct exec_domain;
#define CLONE_THREAD 0x00010000 /* Same thread group? */
#define CLONE_NEWNS 0x00020000 /* New namespace group? */
#define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */
+#define CLONE_SETTLS 0x00080000 /* create a new TLS for the child */
+#define CLONE_SETTID 0x00100000 /* write the TID back to userspace */
+#define CLONE_DETACHED 0x00200000 /* parent wants no child-exit signal */
+#define CLONE_RELEASE_VM 0x00400000 /* release the userspace VM */
#define CLONE_SIGNAL (CLONE_SIGHAND | CLONE_THREAD)
@@ -303,6 +307,7 @@ struct task_struct {
wait_queue_head_t wait_chldexit; /* for wait4() */
struct completion *vfork_done; /* for vfork() */
+ long *user_vm_lock; /* for CLONE_RELEASE_VM */
unsigned long rt_priority;
unsigned long it_real_value, it_prof_value, it_virt_value;
diff --git a/include/linux/smp.h b/include/linux/smp.h
index 9c6edbd8e6ec..6f6c6ed7a239 100644
--- a/include/linux/smp.h
+++ b/include/linux/smp.h
@@ -96,9 +96,6 @@ static inline void smp_send_reschedule_all(void) { }
#define cpu_online_map 1
#define cpu_online(cpu) ({ cpu; 1; })
#define num_online_cpus() 1
-#define __per_cpu_data
-#define per_cpu(var, cpu) var
-#define this_cpu(var) var
struct notifier_block;
diff --git a/include/linux/stringify.h b/include/linux/stringify.h
index 8a8323750228..0b4388356c87 100644
--- a/include/linux/stringify.h
+++ b/include/linux/stringify.h
@@ -4,10 +4,6 @@
/* Indirect stringification. Doing two levels allows the parameter to be a
* macro itself. For example, compile with -DFOO=bar, __stringify(FOO)
* converts to "bar".
- *
- * The "..." is gcc's cpp vararg macro syntax. It is required because __ALIGN,
- * in linkage.h, contains a comma, which when expanded, causes it to look
- * like two arguments, which breaks the standard non-vararg stringizer.
*/
#define __stringify_1(x) #x
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h
index eb118134b0c0..34cbc22c0732 100644
--- a/include/linux/sunrpc/svcsock.h
+++ b/include/linux/sunrpc/svcsock.h
@@ -30,6 +30,7 @@ struct svc_sock {
#define SK_TEMP 4 /* temp (TCP) socket */
#define SK_QUED 5 /* on serv->sk_sockets */
#define SK_DEAD 6 /* socket closed */
+#define SK_CHNGBUF 7 /* need to change snd/rcv buffer sizes */
int sk_reserved; /* space on outq that is reserved */
diff --git a/include/linux/usb.h b/include/linux/usb.h
index d9907d770a30..7f44f0ff05ef 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -734,6 +734,7 @@ extern void usb_deregister_dev(int num_minors, int start_minor);
*/
#define URB_SHORT_NOT_OK 0x0001 /* report short reads as errors */
#define USB_ISO_ASAP 0x0002 /* iso-only, urb->start_frame ignored */
+#define URB_NO_DMA_MAP 0x0004 /* urb->*_dma are valid on submit */
#define USB_ASYNC_UNLINK 0x0008 /* usb_unlink_urb() returns asap */
#define USB_NO_FSBR 0x0020 /* UHCI-specific */
#define USB_ZERO_PACKET 0x0040 /* Finish bulk OUTs with short packet */
@@ -771,11 +772,15 @@ typedef void (*usb_complete_t)(struct urb *);
* @transfer_flags: A variety of flags may be used to affect how URB
* submission, unlinking, or operation are handled. Different
* kinds of URB can use different flags.
- * @transfer_buffer: For non-iso transfers, this identifies the buffer
- * to (or from) which the I/O request will be performed. This
- * buffer must be suitable for DMA; allocate it with kmalloc()
+ * @transfer_buffer: This identifies the buffer to (or from) which
+ * the I/O request will be performed (unless URB_NO_DMA_MAP is set).
+ * This buffer must be suitable for DMA; allocate it with kmalloc()
* or equivalent. For transfers to "in" endpoints, contents of
- * this buffer will be modified.
+ * this buffer will be modified. This buffer is used for data
+ * phases of control transfers.
+ * @transfer_dma: When transfer_flags includes URB_NO_DMA_MAP, the device
+ * driver is saying that it provided this DMA address, which the host
+ * controller driver should use instead of the transfer_buffer.
* @transfer_buffer_length: How big is transfer_buffer. The transfer may
* be broken up into chunks according to the current maximum packet
* size for the endpoint, which is a function of the configuration
@@ -789,6 +794,11 @@ typedef void (*usb_complete_t)(struct urb *);
* @setup_packet: Only used for control transfers, this points to eight bytes
* of setup data. Control transfers always start by sending this data
* to the device. Then transfer_buffer is read or written, if needed.
+ * (Not used when URB_NO_DMA_MAP is set.)
+ * @setup_dma: For control transfers with URB_NO_DMA_MAP set, the device
+ * driver has provided this DMA address for the setup packet. The
+ * host controller driver should use instead of setup_buffer.
+ * If there is a data phase, its buffer is identified by transfer_dma.
* @start_frame: Returns the initial frame for interrupt or isochronous
* transfers.
* @number_of_packets: Lists the number of ISO transfer buffers.
@@ -811,6 +821,23 @@ typedef void (*usb_complete_t)(struct urb *);
* are submitted using usb_submit_urb(), and pending requests may be canceled
* using usb_unlink_urb().
*
+ * Data Transfer Buffers:
+ *
+ * Normally drivers provide I/O buffers allocated with kmalloc() or otherwise
+ * taken from the general page pool. That is provided by transfer_buffer
+ * (control requests also use setup_packet), and host controller drivers
+ * perform a dma mapping (and unmapping) for each buffer transferred. Those
+ * mapping operations can be expensive on some platforms (such using a dma
+ * bounce buffer), although they're cheap on commodity x86 and ppc hardware.
+ *
+ * Alternatively, drivers may pass the URB_NO_DMA_MAP transfer flag, which
+ * tells the host controller driver that no such mapping is needed since
+ * the device driver is DMA-aware. For example, they might allocate a DMA
+ * buffer with usb_buffer_alloc(), or call usb_buffer_map().
+ * When this transfer flag is provided, host controller drivers will use the
+ * dma addresses found in the transfer_dma and/or setup_dma fields rather than
+ * determing a dma address themselves.
+ *
* Initialization:
*
* All URBs submitted must initialize dev, pipe,
@@ -818,10 +845,10 @@ typedef void (*usb_complete_t)(struct urb *);
* The USB_ASYNC_UNLINK transfer flag affects later invocations of
* the usb_unlink_urb() routine.
*
- * All non-isochronous URBs must also initialize
+ * All URBs must also initialize
* transfer_buffer and transfer_buffer_length. They may provide the
* URB_SHORT_NOT_OK transfer flag, indicating that short reads are
- * to be treated as errors.
+ * to be treated as errors; that flag is invalid for write requests.
*
* Bulk URBs may
* use the USB_ZERO_PACKET transfer flag, indicating that bulk OUT transfers
@@ -896,10 +923,12 @@ struct urb
int status; /* (return) non-ISO status */
unsigned int transfer_flags; /* (in) URB_SHORT_NOT_OK | ...*/
void *transfer_buffer; /* (in) associated data buffer */
+ dma_addr_t transfer_dma; /* (in) dma addr for transfer_buffer */
int transfer_buffer_length; /* (in) data buffer length */
int actual_length; /* (return) actual transfer length */
int bandwidth; /* bandwidth for INT/ISO request */
unsigned char *setup_packet; /* (in) setup packet (control only) */
+ dma_addr_t setup_dma; /* (in) dma addr for setup_packet */
int start_frame; /* (modify) start frame (INT/ISO) */
int number_of_packets; /* (in) number of ISO packets */
int interval; /* (in) transfer interval (INT/ISO) */
@@ -910,6 +939,8 @@ struct urb
struct usb_iso_packet_descriptor iso_frame_desc[0]; /* (in) ISO ONLY */
};
+/* -------------------------------------------------------------------------- */
+
/**
* usb_fill_control_urb - initializes a control urb
* @urb: pointer to the urb to initialize.
@@ -1032,6 +1063,16 @@ extern struct urb *usb_get_urb(struct urb *urb);
extern int usb_submit_urb(struct urb *urb, int mem_flags);
extern int usb_unlink_urb(struct urb *urb);
+#define HAVE_USB_BUFFERS
+void *usb_buffer_alloc (struct usb_device *dev, size_t size,
+ int mem_flags, dma_addr_t *dma);
+void usb_buffer_free (struct usb_device *dev, size_t size,
+ void *addr, dma_addr_t dma);
+
+struct urb *usb_buffer_map (struct urb *urb);
+void usb_buffer_dmasync (struct urb *urb);
+void usb_buffer_unmap (struct urb *urb);
+
/*-------------------------------------------------------------------*
* SYNCHRONOUS CALL SUPPORT *
*-------------------------------------------------------------------*/
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 9cc67b500368..5da711fefc6f 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -1,44 +1,47 @@
-#ifndef __LINUX_VMALLOC_H
-#define __LINUX_VMALLOC_H
+#ifndef _LINUX_VMALLOC_H
+#define _LINUX_VMALLOC_H
#include <linux/spinlock.h>
-#include <asm/pgtable.h>
-
/* bits in vm_struct->flags */
#define VM_IOREMAP 0x00000001 /* ioremap() and friends */
#define VM_ALLOC 0x00000002 /* vmalloc() */
+#define VM_MAP 0x00000004 /* vmap()ed pages */
struct vm_struct {
- unsigned long flags;
- void * addr;
- unsigned long size;
- unsigned long phys_addr;
- struct vm_struct * next;
+ void *addr;
+ unsigned long size;
+ unsigned long flags;
+ struct page **pages;
+ unsigned int nr_pages;
+ unsigned long phys_addr;
+ struct vm_struct *next;
};
-extern struct vm_struct * get_vm_area (unsigned long size, unsigned long flags);
-extern void vfree(void * addr);
-extern void * __vmalloc (unsigned long size, int gfp_mask, pgprot_t prot);
-extern long vread(char *buf, char *addr, unsigned long count);
-extern void vmfree_area_pages(unsigned long address, unsigned long size);
-extern int vmalloc_area_pages(unsigned long address, unsigned long size,
- int gfp_mask, pgprot_t prot);
-extern struct vm_struct *remove_kernel_area(void *addr);
-
/*
- * Various ways to allocate pages.
+ * Highlevel APIs for driver use
*/
-
-extern void * vmalloc(unsigned long size);
-extern void * vmalloc_32(unsigned long size);
+extern void *vmalloc(unsigned long size);
+extern void *vmalloc_32(unsigned long size);
+extern void *__vmalloc(unsigned long size, int gfp_mask, pgprot_t prot);
+extern void vfree(void *addr);
+
+extern void *vmap(struct page **pages, unsigned int count);
+extern void vunmap(void *addr);
+
+/*
+ * Lowlevel-APIs (not for driver use!)
+ */
+extern struct vm_struct *get_vm_area(unsigned long size, unsigned long flags);
+extern struct vm_struct *remove_vm_area(void *addr);
+extern int map_vm_area(struct vm_struct *area, pgprot_t prot,
+ struct page ***pages);
+extern void unmap_vm_area(struct vm_struct *area);
/*
- * vmlist_lock is a read-write spinlock that protects vmlist
- * Used in mm/vmalloc.c (get_vm_area() and vfree()) and fs/proc/kcore.c.
+ * Internals. Dont't use..
*/
extern rwlock_t vmlist_lock;
+extern struct vm_struct *vmlist;
-extern struct vm_struct * vmlist;
-#endif
-
+#endif /* _LINUX_VMALLOC_H */
diff --git a/include/linux/wait.h b/include/linux/wait.h
index 4141ba6e6ed5..8664b02f230d 100644
--- a/include/linux/wait.h
+++ b/include/linux/wait.h
@@ -43,16 +43,16 @@ typedef struct __wait_queue_head wait_queue_head_t;
*/
#define __WAITQUEUE_INITIALIZER(name, tsk) { \
- task: tsk, \
- func: default_wake_function, \
- task_list: { NULL, NULL } }
+ .task = tsk, \
+ .func = default_wake_function, \
+ .task_list = { NULL, NULL } }
#define DECLARE_WAITQUEUE(name, tsk) \
wait_queue_t name = __WAITQUEUE_INITIALIZER(name, tsk)
#define __WAIT_QUEUE_HEAD_INITIALIZER(name) { \
- lock: SPIN_LOCK_UNLOCKED, \
- task_list: { &(name).task_list, &(name).task_list } }
+ .lock = SPIN_LOCK_UNLOCKED, \
+ .task_list = { &(name).task_list, &(name).task_list } }
#define DECLARE_WAIT_QUEUE_HEAD(name) \
wait_queue_head_t name = __WAIT_QUEUE_HEAD_INITIALIZER(name)
diff --git a/include/video/fbcon.h b/include/video/fbcon.h
index e906f8ca81f5..c28fea0c10c3 100644
--- a/include/video/fbcon.h
+++ b/include/video/fbcon.h
@@ -55,12 +55,6 @@ struct display {
struct fb_var_screeninfo var; /* variable infos. yoffset and vmode */
/* are updated by fbcon.c */
struct fb_cmap cmap; /* colormap */
- int visual;
- int type; /* see FB_TYPE_* */
- int type_aux; /* Interleave for interleaved Planes */
- u_short ypanstep; /* zero if no hardware ypan */
- u_short ywrapstep; /* zero if no hardware ywrap */
- u_long line_length; /* length of a line in bytes */
u_short can_soft_blank; /* zero if no hardware blanking */
u_short inverse; /* != 0 text black on white as default */
struct display_switch *dispsw; /* low level operations */
@@ -73,7 +67,6 @@ struct display {
#endif
/* Filled in by the low-level console driver */
-
struct vc_data *conp; /* pointer to console data */
struct fb_info *fb_info; /* frame buffer for this console */
int vrows; /* number of virtual rows */