Gentoo Archives: gentoo-commits

From: "Mike Pagano (mpagano)" <mpagano@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] linux-patches r1686 - genpatches-2.6/trunk/2.6.33
Date: Thu, 25 Feb 2010 00:12:19
Message-Id: E1NkRKy-0006u3-Dx@stork.gentoo.org
1 Author: mpagano
2 Date: 2010-02-25 00:12:16 +0000 (Thu, 25 Feb 2010)
3 New Revision: 1686
4
5 Added:
6 genpatches-2.6/trunk/2.6.33/4400_alpha-sysctl-uac.patch
7 Modified:
8 genpatches-2.6/trunk/2.6.33/0000_README
9 genpatches-2.6/trunk/2.6.33/4200_fbcondecor-0.9.6.patch
10 Log:
11 Adding fbcondecor 0.9.6-2.6.33-rc7 and modified uac patch
12
13 Modified: genpatches-2.6/trunk/2.6.33/0000_README
14 ===================================================================
15 --- genpatches-2.6/trunk/2.6.33/0000_README 2010-02-24 23:41:07 UTC (rev 1685)
16 +++ genpatches-2.6/trunk/2.6.33/0000_README 2010-02-25 00:12:16 UTC (rev 1686)
17 @@ -46,3 +46,8 @@
18 Patch: 4200_fbcondecor-0.9.6.patch
19 From: http://dev.gentoo.org/~spock
20 Desc: Bootsplash successor by Michal Januszewski
21 +
22 +Patch: 4400_alpha-sysctl-uac.patch
23 +From: Tavis Ormandy <taviso@g.o> and http://bugs.gentoo.org/show_bug.cgi?id=217323
24 +Desc: Enable control of the unaligned access control policy from sysctl
25 +
26
27 Modified: genpatches-2.6/trunk/2.6.33/4200_fbcondecor-0.9.6.patch
28 ===================================================================
29 --- genpatches-2.6/trunk/2.6.33/4200_fbcondecor-0.9.6.patch 2010-02-24 23:41:07 UTC (rev 1685)
30 +++ genpatches-2.6/trunk/2.6.33/4200_fbcondecor-0.9.6.patch 2010-02-25 00:12:16 UTC (rev 1686)
31 @@ -225,7 +225,7 @@
32 + Michal Januszewski <spock@g.o>
33 +
34 diff --git a/drivers/Makefile b/drivers/Makefile
35 -index bc4205d..794ce71 100644
36 +index 6ee53c7..4285118 100644
37 --- a/drivers/Makefile
38 +++ b/drivers/Makefile
39 @@ -9,6 +9,9 @@ obj-y += gpio/
40 @@ -237,8 +237,8 @@
41 +obj-y += char/
42 obj-y += video/
43 obj-$(CONFIG_ACPI) += acpi/
44 - # PnP must come after ACPI since it will eventually need to check if acpi
45 -@@ -21,10 +24,6 @@ obj-$(CONFIG_XEN) += xen/
46 + obj-$(CONFIG_SFI) += sfi/
47 +@@ -22,10 +25,6 @@ obj-$(CONFIG_XEN) += xen/
48 # regulators early, since some subsystems rely on them to initialize
49 obj-$(CONFIG_REGULATOR) += regulator/
50
51 @@ -250,10 +250,10 @@
52 obj-y += gpu/
53
54 diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
55 -index 3b54b39..23ce357 100644
56 +index 5a5c303..5c55b00 100644
57 --- a/drivers/video/Kconfig
58 +++ b/drivers/video/Kconfig
59 -@@ -1160,7 +1160,6 @@ config FB_MATROX
60 +@@ -1180,7 +1180,6 @@ config FB_MATROX
61 select FB_CFB_FILLRECT
62 select FB_CFB_COPYAREA
63 select FB_CFB_IMAGEBLIT
64 @@ -262,10 +262,10 @@
65 ---help---
66 Say Y here if you have a Matrox Millennium, Matrox Millennium II,
67 diff --git a/drivers/video/console/Kconfig b/drivers/video/console/Kconfig
68 -index 2f50a80..aa73fb7 100644
69 +index fc7d9bb..cb8412e 100644
70 --- a/drivers/video/console/Kconfig
71 +++ b/drivers/video/console/Kconfig
72 -@@ -128,6 +128,19 @@ config FRAMEBUFFER_CONSOLE_ROTATION
73 +@@ -121,6 +121,19 @@ config FRAMEBUFFER_CONSOLE_ROTATION
74 such that other users of the framebuffer will remain normally
75 oriented.
76
77 @@ -286,10 +286,10 @@
78 bool "STI text console"
79 depends on PARISC
80 diff --git a/drivers/video/console/Makefile b/drivers/video/console/Makefile
81 -index ac46cc3..e300ea0 100644
82 +index a862e91..86bfcff 100644
83 --- a/drivers/video/console/Makefile
84 +++ b/drivers/video/console/Makefile
85 -@@ -35,6 +35,7 @@ obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon_rotate.o fbcon_cw.o fbcon_ud.o \
86 +@@ -34,6 +34,7 @@ obj-$(CONFIG_FRAMEBUFFER_CONSOLE) += fbcon_rotate.o fbcon_cw.o fbcon_ud.o \
87 fbcon_ccw.o
88 endif
89
90 @@ -298,7 +298,7 @@
91
92 ifeq ($(CONFIG_USB_SISUSBVGA_CON),y)
93 diff --git a/drivers/video/console/bitblit.c b/drivers/video/console/bitblit.c
94 -index 69864b1..77c1feb 100644
95 +index 6b7c8fb..6b4d555 100644
96 --- a/drivers/video/console/bitblit.c
97 +++ b/drivers/video/console/bitblit.c
98 @@ -17,6 +17,7 @@
99 @@ -820,6 +820,380 @@
100 + }
101 +}
102 +
103 +diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
104 +index 3681c6a..f3da96a 100644
105 +--- a/drivers/video/console/fbcon.c
106 ++++ b/drivers/video/console/fbcon.c
107 +@@ -80,6 +80,7 @@
108 + #include <asm/system.h>
109 +
110 + #include "fbcon.h"
111 ++#include "fbcondecor.h"
112 +
113 + #ifdef FBCONDEBUG
114 + # define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __func__ , ## args)
115 +@@ -95,7 +96,7 @@ enum {
116 +
117 + static struct display fb_display[MAX_NR_CONSOLES];
118 +
119 +-static signed char con2fb_map[MAX_NR_CONSOLES];
120 ++signed char con2fb_map[MAX_NR_CONSOLES];
121 + static signed char con2fb_map_boot[MAX_NR_CONSOLES];
122 +
123 + static int logo_lines;
124 +@@ -286,7 +287,7 @@ static inline int fbcon_is_inactive(struct vc_data *vc, struct fb_info *info)
125 + vc->vc_mode != KD_TEXT || ops->graphics);
126 + }
127 +
128 +-static inline int get_color(struct vc_data *vc, struct fb_info *info,
129 ++inline int get_color(struct vc_data *vc, struct fb_info *info,
130 + u16 c, int is_fg)
131 + {
132 + int depth = fb_get_color_depth(&info->var, &info->fix);
133 +@@ -391,6 +392,7 @@ static void fb_flashcursor(struct work_struct *work)
134 + CM_ERASE : CM_DRAW;
135 + ops->cursor(vc, info, mode, softback_lines, get_color(vc, info, c, 1),
136 + get_color(vc, info, c, 0));
137 ++
138 + release_console_sem();
139 + }
140 +
141 +@@ -527,6 +529,9 @@ static int search_for_mapped_con(void)
142 + static int fbcon_takeover(int show_logo)
143 + {
144 + int err, i;
145 ++#ifdef CONFIG_FB_CON_DECOR
146 ++ struct fb_info *info;
147 ++#endif
148 +
149 + if (!num_registered_fb)
150 + return -ENODEV;
151 +@@ -547,6 +552,12 @@ static int fbcon_takeover(int show_logo)
152 + info_idx = -1;
153 + } else {
154 + fbcon_has_console_bind = 1;
155 ++#ifdef CONFIG_FB_CON_DECOR
156 ++ info = registered_fb[info_idx];
157 ++ unlock_fb_info(info);
158 ++ fbcon_decor_init();
159 ++ lock_fb_info(info);
160 ++#endif
161 + }
162 +
163 + return err;
164 +@@ -1001,6 +1012,12 @@ static const char *fbcon_startup(void)
165 + rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
166 + cols /= vc->vc_font.width;
167 + rows /= vc->vc_font.height;
168 ++
169 ++ if (fbcon_decor_active(info, vc)) {
170 ++ cols = vc->vc_decor.twidth / vc->vc_font.width;
171 ++ rows = vc->vc_decor.theight / vc->vc_font.height;
172 ++ }
173 ++
174 + vc_resize(vc, cols, rows);
175 +
176 + DPRINTK("mode: %s\n", info->fix.id);
177 +@@ -1030,7 +1047,7 @@ static void fbcon_init(struct vc_data *vc, int init)
178 + cap = info->flags;
179 +
180 + if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW ||
181 +- (info->fix.type == FB_TYPE_TEXT))
182 ++ (info->fix.type == FB_TYPE_TEXT) || fbcon_decor_active(info, vc))
183 + logo = 0;
184 +
185 + if (var_to_display(p, &info->var, info))
186 +@@ -1239,6 +1256,11 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height,
187 + if (sy < vc->vc_top && vc->vc_top == logo_lines)
188 + vc->vc_top = 0;
189 +
190 ++ if (fbcon_decor_active(info, vc)) {
191 ++ fbcon_decor_clear(vc, info, sy, sx, height, width);
192 ++ return;
193 ++ }
194 ++
195 + /* Split blits that cross physical y_wrap boundary */
196 +
197 + y_break = p->vrows - p->yscroll;
198 +@@ -1258,10 +1280,15 @@ static void fbcon_putcs(struct vc_data *vc, const unsigned short *s,
199 + struct display *p = &fb_display[vc->vc_num];
200 + struct fbcon_ops *ops = info->fbcon_par;
201 +
202 +- if (!fbcon_is_inactive(vc, info))
203 +- ops->putcs(vc, info, s, count, real_y(p, ypos), xpos,
204 +- get_color(vc, info, scr_readw(s), 1),
205 +- get_color(vc, info, scr_readw(s), 0));
206 ++ if (!fbcon_is_inactive(vc, info)) {
207 ++
208 ++ if (fbcon_decor_active(info, vc))
209 ++ fbcon_decor_putcs(vc, info, s, count, ypos, xpos);
210 ++ else
211 ++ ops->putcs(vc, info, s, count, real_y(p, ypos), xpos,
212 ++ get_color(vc, info, scr_readw(s), 1),
213 ++ get_color(vc, info, scr_readw(s), 0));
214 ++ }
215 + }
216 +
217 + static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos)
218 +@@ -1277,8 +1304,13 @@ static void fbcon_clear_margins(struct vc_data *vc, int bottom_only)
219 + struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];
220 + struct fbcon_ops *ops = info->fbcon_par;
221 +
222 +- if (!fbcon_is_inactive(vc, info))
223 +- ops->clear_margins(vc, info, bottom_only);
224 ++ if (!fbcon_is_inactive(vc, info)) {
225 ++ if (fbcon_decor_active(info, vc)) {
226 ++ fbcon_decor_clear_margins(vc, info, bottom_only);
227 ++ } else {
228 ++ ops->clear_margins(vc, info, bottom_only);
229 ++ }
230 ++ }
231 + }
232 +
233 + static void fbcon_cursor(struct vc_data *vc, int mode)
234 +@@ -1798,7 +1830,7 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,
235 + count = vc->vc_rows;
236 + if (softback_top)
237 + fbcon_softback_note(vc, t, count);
238 +- if (logo_shown >= 0)
239 ++ if (logo_shown >= 0 || fbcon_decor_active(info, vc))
240 + goto redraw_up;
241 + switch (p->scrollmode) {
242 + case SCROLL_MOVE:
243 +@@ -1891,6 +1923,8 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,
244 + count = vc->vc_rows;
245 + if (logo_shown >= 0)
246 + goto redraw_down;
247 ++ if (fbcon_decor_active(info, vc))
248 ++ goto redraw_down;
249 + switch (p->scrollmode) {
250 + case SCROLL_MOVE:
251 + fbcon_redraw_blit(vc, info, p, b - 1, b - t - count,
252 +@@ -2039,6 +2073,13 @@ static void fbcon_bmove_rec(struct vc_data *vc, struct display *p, int sy, int s
253 + }
254 + return;
255 + }
256 ++
257 ++ if (fbcon_decor_active(info, vc) && sy == dy && height == 1) {
258 ++ /* must use slower redraw bmove to keep background pic intact */
259 ++ fbcon_decor_bmove_redraw(vc, info, sy, sx, dx, width);
260 ++ return;
261 ++ }
262 ++
263 + ops->bmove(vc, info, real_y(p, sy), sx, real_y(p, dy), dx,
264 + height, width);
265 + }
266 +@@ -2109,8 +2150,8 @@ static int fbcon_resize(struct vc_data *vc, unsigned int width,
267 + var.yres = virt_h * virt_fh;
268 + x_diff = info->var.xres - var.xres;
269 + y_diff = info->var.yres - var.yres;
270 +- if (x_diff < 0 || x_diff > virt_fw ||
271 +- y_diff < 0 || y_diff > virt_fh) {
272 ++ if ((x_diff < 0 || x_diff > virt_fw ||
273 ++ y_diff < 0 || y_diff > virt_fh) && !vc->vc_decor.state) {
274 + const struct fb_videomode *mode;
275 +
276 + DPRINTK("attempting resize %ix%i\n", var.xres, var.yres);
277 +@@ -2146,6 +2187,21 @@ static int fbcon_switch(struct vc_data *vc)
278 +
279 + info = registered_fb[con2fb_map[vc->vc_num]];
280 + ops = info->fbcon_par;
281 ++ prev_console = ops->currcon;
282 ++ if (prev_console != -1)
283 ++ old_info = registered_fb[con2fb_map[prev_console]];
284 ++
285 ++#ifdef CONFIG_FB_CON_DECOR
286 ++ if (!fbcon_decor_active_vc(vc) && info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
287 ++ struct vc_data *vc_curr = vc_cons[prev_console].d;
288 ++ if (vc_curr && fbcon_decor_active_vc(vc_curr)) {
289 ++ /* Clear the screen to avoid displaying funky colors during
290 ++ * palette updates. */
291 ++ memset((u8*)info->screen_base + info->fix.line_length * info->var.yoffset,
292 ++ 0, info->var.yres * info->fix.line_length);
293 ++ }
294 ++ }
295 ++#endif
296 +
297 + if (softback_top) {
298 + if (softback_lines)
299 +@@ -2164,9 +2220,6 @@ static int fbcon_switch(struct vc_data *vc)
300 + logo_shown = FBCON_LOGO_CANSHOW;
301 + }
302 +
303 +- prev_console = ops->currcon;
304 +- if (prev_console != -1)
305 +- old_info = registered_fb[con2fb_map[prev_console]];
306 + /*
307 + * FIXME: If we have multiple fbdev's loaded, we need to
308 + * update all info->currcon. Perhaps, we can place this
309 +@@ -2210,6 +2263,18 @@ static int fbcon_switch(struct vc_data *vc)
310 + fbcon_del_cursor_timer(old_info);
311 + }
312 +
313 ++ if (fbcon_decor_active_vc(vc)) {
314 ++ struct vc_data *vc_curr = vc_cons[prev_console].d;
315 ++
316 ++ if (!vc_curr->vc_decor.theme ||
317 ++ strcmp(vc->vc_decor.theme, vc_curr->vc_decor.theme) ||
318 ++ (fbcon_decor_active_nores(info, vc_curr) &&
319 ++ !fbcon_decor_active(info, vc_curr))) {
320 ++ if (fbcon_decor_call_helper("modechange", vc->vc_num))
321 ++ fbcon_decor_disable(vc, 0);
322 ++ }
323 ++ }
324 ++
325 + if (fbcon_is_inactive(vc, info) ||
326 + ops->blank_state != FB_BLANK_UNBLANK)
327 + fbcon_del_cursor_timer(info);
328 +@@ -2318,15 +2383,20 @@ static int fbcon_blank(struct vc_data *vc, int blank, int mode_switch)
329 + }
330 + }
331 +
332 +- if (!fbcon_is_inactive(vc, info)) {
333 ++ if (!fbcon_is_inactive(vc, info)) {
334 + if (ops->blank_state != blank) {
335 + ops->blank_state = blank;
336 + fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW);
337 + ops->cursor_flash = (!blank);
338 +
339 +- if (!(info->flags & FBINFO_MISC_USEREVENT))
340 +- if (fb_blank(info, blank))
341 +- fbcon_generic_blank(vc, info, blank);
342 ++ if (!(info->flags & FBINFO_MISC_USEREVENT)) {
343 ++ if (fb_blank(info, blank)) {
344 ++ if (fbcon_decor_active(info, vc))
345 ++ fbcon_decor_blank(vc, info, blank);
346 ++ else
347 ++ fbcon_generic_blank(vc, info, blank);
348 ++ }
349 ++ }
350 + }
351 +
352 + if (!blank)
353 +@@ -2477,13 +2547,22 @@ static int fbcon_do_set_font(struct vc_data *vc, int w, int h,
354 + }
355 +
356 + if (resize) {
357 ++ /* reset wrap/pan */
358 + int cols, rows;
359 +
360 + cols = FBCON_SWAP(ops->rotate, info->var.xres, info->var.yres);
361 + rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
362 ++
363 ++ if (fbcon_decor_active(info, vc)) {
364 ++ info->var.xoffset = info->var.yoffset = p->yscroll = 0;
365 ++ cols = vc->vc_decor.twidth;
366 ++ rows = vc->vc_decor.theight;
367 ++ }
368 + cols /= w;
369 + rows /= h;
370 ++
371 + vc_resize(vc, cols, rows);
372 ++
373 + if (CON_IS_VISIBLE(vc) && softback_buf)
374 + fbcon_update_softback(vc);
375 + } else if (CON_IS_VISIBLE(vc)
376 +@@ -2612,7 +2691,11 @@ static int fbcon_set_palette(struct vc_data *vc, unsigned char *table)
377 + int i, j, k, depth;
378 + u8 val;
379 +
380 +- if (fbcon_is_inactive(vc, info))
381 ++ if (fbcon_is_inactive(vc, info)
382 ++#ifdef CONFIG_FB_CON_DECOR
383 ++ || vc->vc_num != fg_console
384 ++#endif
385 ++ )
386 + return -EINVAL;
387 +
388 + if (!CON_IS_VISIBLE(vc))
389 +@@ -2638,7 +2721,49 @@ static int fbcon_set_palette(struct vc_data *vc, unsigned char *table)
390 + } else
391 + fb_copy_cmap(fb_default_cmap(1 << depth), &palette_cmap);
392 +
393 +- return fb_set_cmap(&palette_cmap, info);
394 ++ if (fbcon_decor_active(info, vc_cons[fg_console].d) &&
395 ++ info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
396 ++
397 ++ u16 *red, *green, *blue;
398 ++ int minlen = min(min(info->var.red.length, info->var.green.length),
399 ++ info->var.blue.length);
400 ++ int h;
401 ++
402 ++ struct fb_cmap cmap = {
403 ++ .start = 0,
404 ++ .len = (1 << minlen),
405 ++ .red = NULL,
406 ++ .green = NULL,
407 ++ .blue = NULL,
408 ++ .transp = NULL
409 ++ };
410 ++
411 ++ red = kmalloc(256 * sizeof(u16) * 3, GFP_KERNEL);
412 ++
413 ++ if (!red)
414 ++ goto out;
415 ++
416 ++ green = red + 256;
417 ++ blue = green + 256;
418 ++ cmap.red = red;
419 ++ cmap.green = green;
420 ++ cmap.blue = blue;
421 ++
422 ++ for (i = 0; i < cmap.len; i++) {
423 ++ red[i] = green[i] = blue[i] = (0xffff * i)/(cmap.len-1);
424 ++ }
425 ++
426 ++ h = fb_set_cmap(&cmap, info);
427 ++ fbcon_decor_fix_pseudo_pal(info, vc_cons[fg_console].d);
428 ++ kfree(red);
429 ++
430 ++ return h;
431 ++
432 ++ } else if (fbcon_decor_active(info, vc_cons[fg_console].d) &&
433 ++ info->var.bits_per_pixel == 8 && info->bgdecor.cmap.red != NULL)
434 ++ fb_set_cmap(&info->bgdecor.cmap, info);
435 ++
436 ++out: return fb_set_cmap(&palette_cmap, info);
437 + }
438 +
439 + static u16 *fbcon_screen_pos(struct vc_data *vc, int offset)
440 +@@ -2846,7 +2971,7 @@ static void fbcon_modechanged(struct fb_info *info)
441 + struct fbcon_ops *ops = info->fbcon_par;
442 + struct vc_data *vc;
443 + struct display *p;
444 +- int rows, cols;
445 ++ int rows, cols, res;
446 +
447 + if (!ops || ops->currcon < 0)
448 + return;
449 +@@ -2864,7 +2989,18 @@ static void fbcon_modechanged(struct fb_info *info)
450 + rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
451 + cols /= vc->vc_font.width;
452 + rows /= vc->vc_font.height;
453 +- vc_resize(vc, cols, rows);
454 ++
455 ++ if (!fbcon_decor_active_nores(info, vc)) {
456 ++ vc_resize(vc, cols, rows);
457 ++ } else {
458 ++ /* HACK: Do this properly at some point.. */
459 ++ unlock_fb_info(info);
460 ++ res = fbcon_decor_call_helper("modechange", vc->vc_num);
461 ++ lock_fb_info(info);
462 ++ if (res)
463 ++ fbcon_decor_disable(vc, 0);
464 ++ }
465 ++
466 + updatescrollmode(p, info, vc);
467 + scrollback_max = 0;
468 + scrollback_current = 0;
469 +@@ -3498,6 +3634,7 @@ static void fbcon_exit(void)
470 + }
471 + }
472 +
473 ++ fbcon_decor_exit();
474 + fbcon_has_exited = 1;
475 + }
476 +
477 diff --git a/drivers/video/console/fbcondecor.c b/drivers/video/console/fbcondecor.c
478 new file mode 100644
479 index 0000000..a0b4ae3
480 @@ -1506,10 +1880,10 @@
481 }
482
483 diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
484 -index a85c818..1f1c24b 100644
485 +index 99bbd28..893bca4 100644
486 --- a/drivers/video/fbmem.c
487 +++ b/drivers/video/fbmem.c
488 -@@ -1173,15 +1173,6 @@ struct fb_fix_screeninfo32 {
489 +@@ -1184,15 +1184,6 @@ struct fb_fix_screeninfo32 {
490 u16 reserved[3];
491 };
492
493 @@ -1599,7 +1973,7 @@
494 };
495
496 diff --git a/include/linux/fb.h b/include/linux/fb.h
497 -index f847df9..7ac118e 100644
498 +index 369767b..2c14913 100644
499 --- a/include/linux/fb.h
500 +++ b/include/linux/fb.h
501 @@ -3,13 +3,31 @@
502 @@ -1660,7 +2034,7 @@
503
504 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */
505 #define FB_TYPE_PLANES 1 /* Non interleaved planes */
506 -@@ -281,6 +316,28 @@ struct fb_cmap {
507 +@@ -282,6 +317,28 @@ struct fb_cmap {
508 __u16 *transp; /* transparency, can be NULL */
509 };
510
511 @@ -1689,7 +2063,7 @@
512 struct fb_con2fbmap {
513 __u32 console;
514 __u32 framebuffer;
515 -@@ -362,6 +419,34 @@ struct fb_image {
516 +@@ -363,6 +420,34 @@ struct fb_image {
517 struct fb_cmap cmap; /* color map info */
518 };
519
520 @@ -1724,7 +2098,7 @@
521 /*
522 * hardware cursor control
523 */
524 -@@ -859,6 +944,9 @@ struct fb_info {
525 +@@ -855,6 +940,9 @@ struct fb_info {
526 #define FBINFO_STATE_SUSPENDED 1
527 u32 state; /* Hardware state i.e suspend */
528 void *fbcon_par; /* fbcon use-only private area */
529 @@ -1735,10 +2109,10 @@
530 void *par;
531 /* we need the PCI or similiar aperture base/size not
532 diff --git a/kernel/sysctl.c b/kernel/sysctl.c
533 -index 98e0232..24f4e31 100644
534 +index 8a68b24..3232e2f 100644
535 --- a/kernel/sysctl.c
536 +++ b/kernel/sysctl.c
537 -@@ -118,6 +118,9 @@ static int ngroups_max = NGROUPS_MAX;
538 +@@ -123,6 +123,9 @@ static int ngroups_max = NGROUPS_MAX;
539 extern char modprobe_path[];
540 extern int modules_disabled;
541 #endif
542 @@ -1748,383 +2122,21 @@
543 #ifdef CONFIG_CHR_DEV_SG
544 extern int sg_big_buff;
545 #endif
546 -@@ -230,6 +233,18 @@ static struct ctl_table root_table[] = {
547 +@@ -232,6 +235,16 @@ static struct ctl_table root_table[] = {
548 .mode = 0555,
549 .child = dev_table,
550 },
551 +#ifdef CONFIG_FB_CON_DECOR
552 + {
553 -+ .ctl_name = CTL_UNNUMBERED,
554 + .procname = "fbcondecor",
555 + .data = &fbcon_decor_path,
556 + .maxlen = KMOD_PATH_LEN,
557 + .mode = 0644,
558 + .proc_handler = &proc_dostring,
559 -+ .strategy = &sysctl_string,
560 + },
561 +#endif
562 +
563 /*
564 * NOTE: do not add new entries to this table unless you have read
565 * Documentation/sysctl/ctl_unnumbered.txt
566 ---- a/drivers/video/console/fbcon.c 2009-10-07 20:24:23.000000000 -0400
567 -+++ b/drivers/video/console/fbcon.c 2009-10-07 20:23:26.000000000 -0400
568 -@@ -80,6 +80,7 @@
569 - #include <asm/system.h>
570 -
571 - #include "fbcon.h"
572 -+#include "fbcondecor.h"
573 -
574 - #ifdef FBCONDEBUG
575 - # define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __func__ , ## args)
576 -@@ -95,7 +96,7 @@ enum {
577 -
578 - static struct display fb_display[MAX_NR_CONSOLES];
579 -
580 --static signed char con2fb_map[MAX_NR_CONSOLES];
581 -+signed char con2fb_map[MAX_NR_CONSOLES];
582 - static signed char con2fb_map_boot[MAX_NR_CONSOLES];
583 -
584 - static int logo_lines;
585 -@@ -286,7 +287,7 @@ static inline int fbcon_is_inactive(stru
586 - vc->vc_mode != KD_TEXT || ops->graphics);
587 - }
588 -
589 --static inline int get_color(struct vc_data *vc, struct fb_info *info,
590 -+inline int get_color(struct vc_data *vc, struct fb_info *info,
591 - u16 c, int is_fg)
592 - {
593 - int depth = fb_get_color_depth(&info->var, &info->fix);
594 -@@ -391,6 +392,7 @@ static void fb_flashcursor(struct work_s
595 - CM_ERASE : CM_DRAW;
596 - ops->cursor(vc, info, mode, softback_lines, get_color(vc, info, c, 1),
597 - get_color(vc, info, c, 0));
598 -+
599 - release_console_sem();
600 - }
601 -
602 -@@ -527,6 +529,7 @@ static int search_for_mapped_con(void)
603 - static int fbcon_takeover(int show_logo)
604 - {
605 - int err, i;
606 -+ struct fb_info *info;
607 -
608 - if (!num_registered_fb)
609 - return -ENODEV;
610 -@@ -540,6 +543,8 @@ static int fbcon_takeover(int show_logo)
611 - err = take_over_console(&fb_con, first_fb_vc, last_fb_vc,
612 - fbcon_is_default);
613 -
614 -+ info = registered_fb[info_idx];
615 -+
616 - if (err) {
617 - for (i = first_fb_vc; i <= last_fb_vc; i++) {
618 - con2fb_map[i] = -1;
619 -@@ -547,6 +552,9 @@ static int fbcon_takeover(int show_logo)
620 - info_idx = -1;
621 - } else {
622 - fbcon_has_console_bind = 1;
623 -+ unlock_fb_info(info);
624 -+ fbcon_decor_init();
625 -+ lock_fb_info(info);
626 - }
627 -
628 - return err;
629 -@@ -988,6 +996,12 @@ static const char *fbcon_startup(void)
630 - rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
631 - cols /= vc->vc_font.width;
632 - rows /= vc->vc_font.height;
633 -+
634 -+ if (fbcon_decor_active(info, vc)) {
635 -+ cols = vc->vc_decor.twidth / vc->vc_font.width;
636 -+ rows = vc->vc_decor.theight / vc->vc_font.height;
637 -+ }
638 -+
639 - vc_resize(vc, cols, rows);
640 -
641 - DPRINTK("mode: %s\n", info->fix.id);
642 -@@ -1017,7 +1031,7 @@ static void fbcon_init(struct vc_data *v
643 - cap = info->flags;
644 -
645 - if (vc != svc || logo_shown == FBCON_LOGO_DONTSHOW ||
646 -- (info->fix.type == FB_TYPE_TEXT))
647 -+ (info->fix.type == FB_TYPE_TEXT) || fbcon_decor_active(info, vc))
648 - logo = 0;
649 -
650 - if (var_to_display(p, &info->var, info))
651 -@@ -1219,6 +1233,11 @@ static void fbcon_clear(struct vc_data *
652 - if (sy < vc->vc_top && vc->vc_top == logo_lines)
653 - vc->vc_top = 0;
654 -
655 -+ if (fbcon_decor_active(info, vc)) {
656 -+ fbcon_decor_clear(vc, info, sy, sx, height, width);
657 -+ return;
658 -+ }
659 -+
660 - /* Split blits that cross physical y_wrap boundary */
661 -
662 - y_break = p->vrows - p->yscroll;
663 -@@ -1238,10 +1257,15 @@ static void fbcon_putcs(struct vc_data *
664 - struct display *p = &fb_display[vc->vc_num];
665 - struct fbcon_ops *ops = info->fbcon_par;
666 -
667 -- if (!fbcon_is_inactive(vc, info))
668 -- ops->putcs(vc, info, s, count, real_y(p, ypos), xpos,
669 -- get_color(vc, info, scr_readw(s), 1),
670 -- get_color(vc, info, scr_readw(s), 0));
671 -+ if (!fbcon_is_inactive(vc, info)) {
672 -+
673 -+ if (fbcon_decor_active(info, vc))
674 -+ fbcon_decor_putcs(vc, info, s, count, ypos, xpos);
675 -+ else
676 -+ ops->putcs(vc, info, s, count, real_y(p, ypos), xpos,
677 -+ get_color(vc, info, scr_readw(s), 1),
678 -+ get_color(vc, info, scr_readw(s), 0));
679 -+ }
680 - }
681 -
682 - static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos)
683 -@@ -1257,8 +1281,13 @@ static void fbcon_clear_margins(struct v
684 - struct fb_info *info = registered_fb[con2fb_map[vc->vc_num]];
685 - struct fbcon_ops *ops = info->fbcon_par;
686 -
687 -- if (!fbcon_is_inactive(vc, info))
688 -- ops->clear_margins(vc, info, bottom_only);
689 -+ if (!fbcon_is_inactive(vc, info)) {
690 -+ if (fbcon_decor_active(info, vc)) {
691 -+ fbcon_decor_clear_margins(vc, info, bottom_only);
692 -+ } else {
693 -+ ops->clear_margins(vc, info, bottom_only);
694 -+ }
695 -+ }
696 - }
697 -
698 - static void fbcon_cursor(struct vc_data *vc, int mode)
699 -@@ -1778,7 +1807,7 @@ static int fbcon_scroll(struct vc_data *
700 - count = vc->vc_rows;
701 - if (softback_top)
702 - fbcon_softback_note(vc, t, count);
703 -- if (logo_shown >= 0)
704 -+ if (logo_shown >= 0 || fbcon_decor_active(info, vc))
705 - goto redraw_up;
706 - switch (p->scrollmode) {
707 - case SCROLL_MOVE:
708 -@@ -1871,6 +1900,8 @@ static int fbcon_scroll(struct vc_data *
709 - count = vc->vc_rows;
710 - if (logo_shown >= 0)
711 - goto redraw_down;
712 -+ if (fbcon_decor_active(info, vc))
713 -+ goto redraw_down;
714 - switch (p->scrollmode) {
715 - case SCROLL_MOVE:
716 - fbcon_redraw_blit(vc, info, p, b - 1, b - t - count,
717 -@@ -2019,6 +2050,13 @@ static void fbcon_bmove_rec(struct vc_da
718 - }
719 - return;
720 - }
721 -+
722 -+ if (fbcon_decor_active(info, vc) && sy == dy && height == 1) {
723 -+ /* must use slower redraw bmove to keep background pic intact */
724 -+ fbcon_decor_bmove_redraw(vc, info, sy, sx, dx, width);
725 -+ return;
726 -+ }
727 -+
728 - ops->bmove(vc, info, real_y(p, sy), sx, real_y(p, dy), dx,
729 - height, width);
730 - }
731 -@@ -2089,8 +2127,8 @@ static int fbcon_resize(struct vc_data *
732 - var.yres = virt_h * virt_fh;
733 - x_diff = info->var.xres - var.xres;
734 - y_diff = info->var.yres - var.yres;
735 -- if (x_diff < 0 || x_diff > virt_fw ||
736 -- y_diff < 0 || y_diff > virt_fh) {
737 -+ if ((x_diff < 0 || x_diff > virt_fw ||
738 -+ y_diff < 0 || y_diff > virt_fh) && !vc->vc_decor.state) {
739 - const struct fb_videomode *mode;
740 -
741 - DPRINTK("attempting resize %ix%i\n", var.xres, var.yres);
742 -@@ -2126,6 +2164,19 @@ static int fbcon_switch(struct vc_data *
743 -
744 - info = registered_fb[con2fb_map[vc->vc_num]];
745 - ops = info->fbcon_par;
746 -+ prev_console = ops->currcon;
747 -+ if (prev_console != -1)
748 -+ old_info = registered_fb[con2fb_map[prev_console]];
749 -+
750 -+ if (!fbcon_decor_active_vc(vc) && info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
751 -+ struct vc_data *vc_curr = vc_cons[prev_console].d;
752 -+ if (vc_curr && fbcon_decor_active_vc(vc_curr)) {
753 -+ /* Clear the screen to avoid displaying funky colors during
754 -+ * palette updates. */
755 -+ memset((u8*)info->screen_base + info->fix.line_length * info->var.yoffset,
756 -+ 0, info->var.yres * info->fix.line_length);
757 -+ }
758 -+ }
759 -
760 - if (softback_top) {
761 - if (softback_lines)
762 -@@ -2144,9 +2195,6 @@ static int fbcon_switch(struct vc_data *
763 - logo_shown = FBCON_LOGO_CANSHOW;
764 - }
765 -
766 -- prev_console = ops->currcon;
767 -- if (prev_console != -1)
768 -- old_info = registered_fb[con2fb_map[prev_console]];
769 - /*
770 - * FIXME: If we have multiple fbdev's loaded, we need to
771 - * update all info->currcon. Perhaps, we can place this
772 -@@ -2184,6 +2232,18 @@ static int fbcon_switch(struct vc_data *
773 - fbcon_del_cursor_timer(old_info);
774 - }
775 -
776 -+ if (fbcon_decor_active_vc(vc)) {
777 -+ struct vc_data *vc_curr = vc_cons[prev_console].d;
778 -+
779 -+ if (!vc_curr->vc_decor.theme ||
780 -+ strcmp(vc->vc_decor.theme, vc_curr->vc_decor.theme) ||
781 -+ (fbcon_decor_active_nores(info, vc_curr) &&
782 -+ !fbcon_decor_active(info, vc_curr))) {
783 -+ if (fbcon_decor_call_helper("modechange", vc->vc_num))
784 -+ fbcon_decor_disable(vc, 0);
785 -+ }
786 -+ }
787 -+
788 - if (fbcon_is_inactive(vc, info) ||
789 - ops->blank_state != FB_BLANK_UNBLANK)
790 - fbcon_del_cursor_timer(info);
791 -@@ -2295,15 +2355,20 @@ static int fbcon_blank(struct vc_data *v
792 - info->fbops->fb_restore_state(info);
793 - }
794 -
795 -- if (!fbcon_is_inactive(vc, info)) {
796 -+ if (!fbcon_is_inactive(vc, info)) {
797 - if (ops->blank_state != blank) {
798 - ops->blank_state = blank;
799 - fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW);
800 - ops->cursor_flash = (!blank);
801 -
802 -- if (!(info->flags & FBINFO_MISC_USEREVENT))
803 -- if (fb_blank(info, blank))
804 -- fbcon_generic_blank(vc, info, blank);
805 -+ if (!(info->flags & FBINFO_MISC_USEREVENT)) {
806 -+ if (fb_blank(info, blank)) {
807 -+ if (fbcon_decor_active(info, vc))
808 -+ fbcon_decor_blank(vc, info, blank);
809 -+ else
810 -+ fbcon_generic_blank(vc, info, blank);
811 -+ }
812 -+ }
813 - }
814 -
815 - if (!blank)
816 -@@ -2454,13 +2519,22 @@ static int fbcon_do_set_font(struct vc_d
817 - }
818 -
819 - if (resize) {
820 -+ /* reset wrap/pan */
821 - int cols, rows;
822 -
823 - cols = FBCON_SWAP(ops->rotate, info->var.xres, info->var.yres);
824 - rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
825 -+
826 -+ info->var.xoffset = info->var.yoffset = p->yscroll = 0;
827 -+ if (fbcon_decor_active(info, vc)) {
828 -+ cols = vc->vc_decor.twidth;
829 -+ rows = vc->vc_decor.theight;
830 -+ }
831 - cols /= w;
832 - rows /= h;
833 -+
834 - vc_resize(vc, cols, rows);
835 -+
836 - if (CON_IS_VISIBLE(vc) && softback_buf)
837 - fbcon_update_softback(vc);
838 - } else if (CON_IS_VISIBLE(vc)
839 -@@ -2589,7 +2663,7 @@ static int fbcon_set_palette(struct vc_d
840 - int i, j, k, depth;
841 - u8 val;
842 -
843 -- if (fbcon_is_inactive(vc, info))
844 -+ if (fbcon_is_inactive(vc, info) || vc->vc_num != fg_console)
845 - return -EINVAL;
846 -
847 - if (!CON_IS_VISIBLE(vc))
848 -@@ -2615,7 +2689,49 @@ static int fbcon_set_palette(struct vc_d
849 - } else
850 - fb_copy_cmap(fb_default_cmap(1 << depth), &palette_cmap);
851 -
852 -- return fb_set_cmap(&palette_cmap, info);
853 -+ if (fbcon_decor_active(info, vc_cons[fg_console].d) &&
854 -+ info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
855 -+
856 -+ u16 *red, *green, *blue;
857 -+ int minlen = min(min(info->var.red.length, info->var.green.length),
858 -+ info->var.blue.length);
859 -+ int h;
860 -+
861 -+ struct fb_cmap cmap = {
862 -+ .start = 0,
863 -+ .len = (1 << minlen),
864 -+ .red = NULL,
865 -+ .green = NULL,
866 -+ .blue = NULL,
867 -+ .transp = NULL
868 -+ };
869 -+
870 -+ red = kmalloc(256 * sizeof(u16) * 3, GFP_KERNEL);
871 -+
872 -+ if (!red)
873 -+ goto out;
874 -+
875 -+ green = red + 256;
876 -+ blue = green + 256;
877 -+ cmap.red = red;
878 -+ cmap.green = green;
879 -+ cmap.blue = blue;
880 -+
881 -+ for (i = 0; i < cmap.len; i++) {
882 -+ red[i] = green[i] = blue[i] = (0xffff * i)/(cmap.len-1);
883 -+ }
884 -+
885 -+ h = fb_set_cmap(&cmap, info);
886 -+ fbcon_decor_fix_pseudo_pal(info, vc_cons[fg_console].d);
887 -+ kfree(red);
888 -+
889 -+ return h;
890 -+
891 -+ } else if (fbcon_decor_active(info, vc_cons[fg_console].d) &&
892 -+ info->var.bits_per_pixel == 8 && info->bgdecor.cmap.red != NULL)
893 -+ fb_set_cmap(&info->bgdecor.cmap, info);
894 -+
895 -+out: return fb_set_cmap(&palette_cmap, info);
896 - }
897 -
898 - static u16 *fbcon_screen_pos(struct vc_data *vc, int offset)
899 -@@ -2841,7 +2957,18 @@ static void fbcon_modechanged(struct fb_
900 - rows = FBCON_SWAP(ops->rotate, info->var.yres, info->var.xres);
901 - cols /= vc->vc_font.width;
902 - rows /= vc->vc_font.height;
903 -- vc_resize(vc, cols, rows);
904 -+
905 -+ if (!fbcon_decor_active_nores(info, vc)) {
906 -+ vc_resize(vc, cols, rows);
907 -+ } else {
908 -+ /* HACK: Do this properly at some point.. */
909 -+ unlock_fb_info(info);
910 -+ int res = fbcon_decor_call_helper("modechange", vc->vc_num);
911 -+ lock_fb_info(info);
912 -+ if (res)
913 -+ fbcon_decor_disable(vc, 0);
914 -+ }
915 -+
916 - updatescrollmode(p, info, vc);
917 - scrollback_max = 0;
918 - scrollback_current = 0;
919 -@@ -3475,6 +3602,7 @@ static void fbcon_exit(void)
920 - }
921 - }
922 -
923 -+ fbcon_decor_exit();
924 - fbcon_has_exited = 1;
925 - }
926 -
927 +
928
929 Added: genpatches-2.6/trunk/2.6.33/4400_alpha-sysctl-uac.patch
930 ===================================================================
931 --- genpatches-2.6/trunk/2.6.33/4400_alpha-sysctl-uac.patch (rev 0)
932 +++ genpatches-2.6/trunk/2.6.33/4400_alpha-sysctl-uac.patch 2010-02-25 00:12:16 UTC (rev 1686)
933 @@ -0,0 +1,163 @@
934 +Index: linux-2.6.26-gentoo/arch/alpha/Kconfig
935 +===================================================================
936 +--- linux-2.6.26-gentoo.orig/arch/alpha/Kconfig
937 ++++ linux-2.6.26-gentoo/arch/alpha/Kconfig
938 +@@ -624,6 +624,32 @@ config HZ
939 + default 1200 if ALPHA_RAWHIDE
940 + default 1024
941 +
942 ++config ALPHA_UAC_SYSCTL
943 ++ bool "Configure UAC policy via sysctl"
944 ++ depends on SYSCTL
945 ++ default y
946 ++ ---help---
947 ++ Configuring the UAC (unaligned access control) policy on a Linux
948 ++ system usually involves setting a compile time define. If you say
949 ++ Y here, you will be able to modify the UAC policy at runtime using
950 ++ the /proc interface.
951 ++
952 ++ The UAC policy defines the action Linux should take when an
953 ++ unaligned memory access occurs. The action can include printing a
954 ++ warning message (NOPRINT), sending a signal to the offending
955 ++ program to help developers debug their applications (SIGBUS), or
956 ++ disabling the transparent fixing (NOFIX).
957 ++
958 ++ The sysctls will be initialized to the compile-time defined UAC
959 ++ policy. You can change these manually, or with the sysctl(8)
960 ++ userspace utility.
961 ++
962 ++ To disable the warning messages at runtime, you would use
963 ++
964 ++ echo 1 > /proc/sys/kernel/uac/noprint
965 ++
966 ++ This is pretty harmless. Say Y if you're not sure.
967 ++
968 + source "drivers/pci/Kconfig"
969 + source "drivers/eisa/Kconfig"
970 +
971 +Index: linux-2.6.26-gentoo/arch/alpha/kernel/traps.c
972 +===================================================================
973 +--- linux-2.6.26-gentoo.orig/arch/alpha/kernel/traps.c
974 ++++ linux-2.6.26-gentoo/arch/alpha/kernel/traps.c
975 +@@ -103,6 +103,52 @@ static char * ireg_name[] = {"v0", "t0",
976 + "t10", "t11", "ra", "pv", "at", "gp", "sp", "zero"};
977 + #endif
978 +
979 ++#ifdef CONFIG_ALPHA_UAC_SYSCTL
980 ++
981 ++#include <linux/sysctl.h>
982 ++
983 ++static int enabled_noprint = 0;
984 ++static int enabled_sigbus = 0;
985 ++static int enabled_nofix = 0;
986 ++
987 ++ctl_table uac_table[] = {
988 ++ {
989 ++ .ctl_name = CTL_UNNUMBERED,
990 ++ .procname = "noprint",
991 ++ .data = &enabled_noprint,
992 ++ .maxlen = sizeof (int),
993 ++ .mode = 0644,
994 ++ .proc_handler = &proc_dointvec,
995 ++ },
996 ++ {
997 ++ .ctl_name = CTL_UNNUMBERED,
998 ++ .procname = "sigbus",
999 ++ .data = &enabled_sigbus,
1000 ++ .maxlen = sizeof (int),
1001 ++ .mode = 0644,
1002 ++ .proc_handler = &proc_dointvec,
1003 ++ },
1004 ++ {
1005 ++ .ctl_name = CTL_UNNUMBERED,
1006 ++ .procname = "nofix",
1007 ++ .data = &enabled_nofix,
1008 ++ .maxlen = sizeof (int),
1009 ++ .mode = 0644,
1010 ++ .proc_handler = &proc_dointvec,
1011 ++ },
1012 ++ { .ctl_name = 0 }
1013 ++};
1014 ++
1015 ++static int __init init_uac_sysctl(void)
1016 ++{
1017 ++ /* Initialize sysctls with the #defined UAC policy */
1018 ++ enabled_noprint = (test_thread_flag (TIF_UAC_NOPRINT)) ? 1 : 0;
1019 ++ enabled_sigbus = (test_thread_flag (TIF_UAC_SIGBUS)) ? 1 : 0;
1020 ++ enabled_nofix = (test_thread_flag (TIF_UAC_NOFIX)) ? 1 : 0;
1021 ++ return 0;
1022 ++}
1023 ++#endif
1024 ++
1025 + static void
1026 + dik_show_code(unsigned int *pc)
1027 + {
1028 +@@ -782,7 +828,11 @@ do_entUnaUser(void __user * va, unsigned
1029 + /* Check the UAC bits to decide what the user wants us to do
1030 + with the unaliged access. */
1031 +
1032 ++#ifndef CONFIG_ALPHA_UAC_SYSCTL
1033 + if (!test_thread_flag (TIF_UAC_NOPRINT)) {
1034 ++#else /* CONFIG_ALPHA_UAC_SYSCTL */
1035 ++ if (!(enabled_noprint)) {
1036 ++#endif /* CONFIG_ALPHA_UAC_SYSCTL */
1037 + if (cnt >= 5 && time_after(jiffies, last_time + 5 * HZ)) {
1038 + cnt = 0;
1039 + }
1040 +@@ -793,10 +843,18 @@ do_entUnaUser(void __user * va, unsigned
1041 + }
1042 + last_time = jiffies;
1043 + }
1044 ++#ifndef CONFIG_ALPHA_UAC_SYSCTL
1045 + if (test_thread_flag (TIF_UAC_SIGBUS))
1046 ++#else /* CONFIG_ALPHA_UAC_SYSCTL */
1047 ++ if (enabled_sigbus)
1048 ++#endif /* CONFIG_ALPHA_UAC_SYSCTL */
1049 + goto give_sigbus;
1050 + /* Not sure why you'd want to use this, but... */
1051 ++#ifndef CONFIG_ALPHA_UAC_SYSCTL
1052 + if (test_thread_flag (TIF_UAC_NOFIX))
1053 ++#else /* CONFIG_ALPHA_UAC_SYSCTL */
1054 ++ if (enabled_nofix)
1055 ++#endif /* CONFIG_ALPHA_UAC_SYSCTL */
1056 + return;
1057 +
1058 + /* Don't bother reading ds in the access check since we already
1059 +@@ -1091,3 +1149,7 @@ trap_init(void)
1060 + wrent(entSys, 5);
1061 + wrent(entDbg, 6);
1062 + }
1063 ++
1064 ++#ifdef CONFIG_ALPHA_UAC_SYSCTL
1065 ++ __initcall(init_uac_sysctl);
1066 ++#endif
1067 +Index: linux-2.6.33-gentoo/kernel/sysctl.c
1068 +===================================================================
1069 +--- a/kernel/sysctl.c 2010-02-24 17:52:58.000000000 -0500
1070 ++++ b/kernel/sysctl.c 2010-02-24 17:57:49.000000000 -0500
1071 +@@ -193,6 +193,10 @@ extern struct ctl_table random_table[];
1072 + #ifdef CONFIG_INOTIFY_USER
1073 + extern struct ctl_table inotify_table[];
1074 + #endif
1075 ++#ifdef CONFIG_ALPHA_UAC_SYSCTL
1076 ++extern struct ctl_table uac_table[];
1077 ++#endif
1078 ++
1079 + #ifdef CONFIG_EPOLL
1080 + extern struct ctl_table epoll_table[];
1081 + #endif
1082 +@@ -940,6 +944,14 @@ static struct ctl_table kern_table[] = {
1083 + * NOTE: do not add new entries to this table unless you have read
1084 + * Documentation/sysctl/ctl_unnumbered.txt
1085 + */
1086 ++#ifdef CONFIG_ALPHA_UAC_SYSCTL
1087 ++{
1088 ++ .ctl_name = CTL_UNNUMBERED,
1089 ++ .procname = "uac",
1090 ++ .mode = 0555,
1091 ++ .child = uac_table,
1092 ++},
1093 ++#endif /* CONFIG_ALPHA_UAC_SYSCTL */
1094 + { }
1095 + };
1096 +