From d2b18394259ef621fd2a6322aa9934198fd87a6a Mon Sep 17 00:00:00 2001 From: Russell King Date: Thu, 22 Dec 2005 23:21:38 +0000 Subject: [MMC] Set correct capacity for 1024-byte block cards We were passing set_capacity() the capacity we calculated in terms of the number of blocks on the card, which happened to be the right units for 512-byte block cards. However, with 1024-byte block cards, we end up setting the capacity to half the number of blocks. Fix this by shifting by the appropriate amount. Thanks to Todd Blumer for pointing this out. Use get_capacity() to report the card capacity, rather than recalculating it from the CSD information. Finally, use our chosen IO block size for the SET_BLOCKLEN command rather than the CSD read block size. Currently these are equivalent, but will not be in the future. Signed-off-by: Russell King --- drivers/mmc/mmc_block.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/mmc_block.c b/drivers/mmc/mmc_block.c index d91fcf7c317..abcf19116d7 100644 --- a/drivers/mmc/mmc_block.c +++ b/drivers/mmc/mmc_block.c @@ -359,7 +359,12 @@ static struct mmc_blk_data *mmc_blk_alloc(struct mmc_card *card) md->block_bits = card->csd.read_blkbits; blk_queue_hardsect_size(md->queue.queue, 1 << md->block_bits); - set_capacity(md->disk, card->csd.capacity); + + /* + * The CSD capacity field is in units of read_blkbits. + * set_capacity takes units of 512 bytes. + */ + set_capacity(md->disk, card->csd.capacity << (card->csd.read_blkbits - 9)); } out: return md; @@ -373,7 +378,7 @@ mmc_blk_set_blksize(struct mmc_blk_data *md, struct mmc_card *card) mmc_card_claim_host(card); cmd.opcode = MMC_SET_BLOCKLEN; - cmd.arg = 1 << card->csd.read_blkbits; + cmd.arg = 1 << md->block_bits; cmd.flags = MMC_RSP_R1; err = mmc_wait_for_cmd(card->host, &cmd, 5); mmc_card_release_host(card); @@ -412,10 +417,9 @@ static int mmc_blk_probe(struct mmc_card *card) if (err) goto out; - printk(KERN_INFO "%s: %s %s %dKiB %s\n", + printk(KERN_INFO "%s: %s %s %luKiB %s\n", md->disk->disk_name, mmc_card_id(card), mmc_card_name(card), - (card->csd.capacity << card->csd.read_blkbits) / 1024, - mmc_blk_readonly(card)?"(ro)":""); + get_capacity(md->disk) >> 1, mmc_blk_readonly(card)?"(ro)":""); mmc_set_drvdata(card, md); add_disk(md->disk); -- cgit v1.2.3-70-g09d2 From a710ce08585e920740ffc84c7f3c82f4081169cf Mon Sep 17 00:00:00 2001 From: Russell King Date: Tue, 27 Dec 2005 11:10:34 +0000 Subject: [SERIAL] Fix AMBA PL011 sysrq character handling We only want the received character without the status bits for sysrq handling. Signed-off-by: Russell King --- drivers/serial/amba-pl011.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index 89d7bd3eaee..d84476ee659 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c @@ -160,7 +160,7 @@ pl011_rx_chars(struct uart_amba_port *uap) flag = TTY_FRAME; } - if (uart_handle_sysrq_char(&uap->port, ch, regs)) + if (uart_handle_sysrq_char(&uap->port, ch & 255, regs)) goto ignore_char; uart_insert_char(&uap->port, ch, UART011_DR_OE, ch, flag); -- cgit v1.2.3-70-g09d2 From 516949480d3700cbde4272228a102c84721d6007 Mon Sep 17 00:00:00 2001 From: Paolo 'Blaisorblade' Giarrusso Date: Thu, 29 Dec 2005 17:39:51 +0100 Subject: [PATCH] uml: fix random segfaults at bootup Don't use printk() where "current_thread_info()" is crap. Until when we switch to running on init_stack, current_thread_info() evaluates to crap. Printk uses "current" at times (in detail, ¤t is evaluated with CONFIG_DEBUG_SPINLOCK to check the spinlock owner task). And this leads to random segmentation faults. Exactly, what happens is that ¤t = *(current_thread_info()), i.e. round down $esp and dereference the value. I.e. access the stack below $esp, which causes SIGSEGV on a VM_GROWSDOWN vma (see arch/i386/mm/fault.c). Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Linus Torvalds --- arch/um/os-Linux/start_up.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c index 37517d49c4a..29a9e3f4376 100644 --- a/arch/um/os-Linux/start_up.c +++ b/arch/um/os-Linux/start_up.c @@ -116,16 +116,16 @@ static int stop_ptraced_child(int pid, void *stack, int exitcode, if(!WIFEXITED(status) || (WEXITSTATUS(status) != exitcode)) { int exit_with = WEXITSTATUS(status); if (exit_with == 2) - printk("check_ptrace : child exited with status 2. " + printf("check_ptrace : child exited with status 2. " "Serious trouble happening! Try updating your " "host skas patch!\nDisabling SYSEMU support."); - printk("check_ptrace : child exited with exitcode %d, while " + printf("check_ptrace : child exited with exitcode %d, while " "expecting %d; status 0x%x", exit_with, exitcode, status); if (mustpanic) panic("\n"); else - printk("\n"); + printf("\n"); ret = -1; } @@ -183,7 +183,7 @@ static void __init check_sysemu(void) void *stack; int pid, n, status, count=0; - printk("Checking syscall emulation patch for ptrace..."); + printf("Checking syscall emulation patch for ptrace..."); sysemu_supported = 0; pid = start_ptraced_child(&stack); @@ -207,10 +207,10 @@ static void __init check_sysemu(void) goto fail_stopped; sysemu_supported = 1; - printk("OK\n"); + printf("OK\n"); set_using_sysemu(!force_sysemu_disabled); - printk("Checking advanced syscall emulation patch for ptrace..."); + printf("Checking advanced syscall emulation patch for ptrace..."); pid = start_ptraced_child(&stack); if(ptrace(PTRACE_OLDSETOPTIONS, pid, 0, @@ -246,7 +246,7 @@ static void __init check_sysemu(void) goto fail_stopped; sysemu_supported = 2; - printk("OK\n"); + printf("OK\n"); if ( !force_sysemu_disabled ) set_using_sysemu(sysemu_supported); @@ -255,7 +255,7 @@ static void __init check_sysemu(void) fail: stop_ptraced_child(pid, stack, 1, 0); fail_stopped: - printk("missing\n"); + printf("missing\n"); } static void __init check_ptrace(void) @@ -263,7 +263,7 @@ static void __init check_ptrace(void) void *stack; int pid, syscall, n, status; - printk("Checking that ptrace can change system call numbers..."); + printf("Checking that ptrace can change system call numbers..."); pid = start_ptraced_child(&stack); if(ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0) @@ -292,7 +292,7 @@ static void __init check_ptrace(void) } } stop_ptraced_child(pid, stack, 0, 1); - printk("OK\n"); + printf("OK\n"); check_sysemu(); } @@ -472,6 +472,8 @@ int can_do_skas(void) int have_devanon = 0; +/* Runs on boot kernel stack - already safe to use printk. */ + void check_devanon(void) { int fd; -- cgit v1.2.3-70-g09d2 From 3d0a07e3310c947c048bd01d8d0efa0e4fae5ba9 Mon Sep 17 00:00:00 2001 From: Paolo 'Blaisorblade' Giarrusso Date: Thu, 29 Dec 2005 17:39:54 +0100 Subject: [PATCH] Hostfs: remove unused var Trivial removal of unused variable from this file - doesn't even change the generated assembly code, in fact (gcc should trigger a warning for unused value here). Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Linus Torvalds --- fs/hostfs/hostfs_kern.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 4684eb7d48c..3aac164c772 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -910,10 +910,8 @@ static struct inode_operations hostfs_dir_iops = { int hostfs_link_readpage(struct file *file, struct page *page) { char *buffer, *name; - long long start; int err; - start = page->index << PAGE_CACHE_SHIFT; buffer = kmap(page); name = inode_name(page->mapping->host, 0); if(name == NULL) return(-ENOMEM); -- cgit v1.2.3-70-g09d2 From 30f04a4efa73dc80bf3f59f3f19ad5a24ac5ac0a Mon Sep 17 00:00:00 2001 From: Paolo 'Blaisorblade' Giarrusso Date: Thu, 29 Dec 2005 17:39:57 +0100 Subject: [PATCH] uml: hostfs - fix possible PAGE_CACHE_SHIFT overflows Prevent page->index << PAGE_CACHE_SHIFT from overflowing. There is a casting there, but was added without care, so it's at the wrong place. Note the extra parens around the shift - "+" is higher precedence than "<<", leading to a GCC warning which saved all us. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Linus Torvalds --- fs/hostfs/hostfs_kern.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c index 3aac164c772..b3ad0bd0312 100644 --- a/fs/hostfs/hostfs_kern.c +++ b/fs/hostfs/hostfs_kern.c @@ -501,11 +501,16 @@ int hostfs_commit_write(struct file *file, struct page *page, unsigned from, long long start; int err = 0; - start = (long long) (page->index << PAGE_CACHE_SHIFT) + from; + start = (((long long) page->index) << PAGE_CACHE_SHIFT) + from; buffer = kmap(page); err = write_file(FILE_HOSTFS_I(file)->fd, &start, buffer + from, to - from); if(err > 0) err = 0; + + /* Actually, if !err, write_file has added to-from to start, so, despite + * the appearance, we are comparing i_size against the _last_ written + * location, as we should. */ + if(!err && (start > inode->i_size)) inode->i_size = start; -- cgit v1.2.3-70-g09d2 From 74433c0fe105f47e78c1f2267312693870c9ebc3 Mon Sep 17 00:00:00 2001 From: Paolo 'Blaisorblade' Giarrusso Date: Thu, 29 Dec 2005 17:39:59 +0100 Subject: [PATCH] Hostfs: update for new glibc - add missing symbol exports Today, when compiling UML, I got warnings for two used unexported symbols: readdir64 and truncate64. Indeed, my glibc headers are aliasing readdir to readdir64 and truncate to truncate64 (and so on). I'm then adding additional exports. Since I've no idea if the symbols where always provided in the supported glibc's, I've added weak definitions too. Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Linus Torvalds --- arch/um/os-Linux/user_syms.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/um/os-Linux/user_syms.c b/arch/um/os-Linux/user_syms.c index 56d3f870926..8da6ab31152 100644 --- a/arch/um/os-Linux/user_syms.c +++ b/arch/um/os-Linux/user_syms.c @@ -34,6 +34,11 @@ EXPORT_SYMBOL(strstr); int sym(void); \ EXPORT_SYMBOL(sym); +extern void readdir64(void) __attribute__((weak)); +EXPORT_SYMBOL(readdir64); +extern void truncate64(void) __attribute__((weak)); +EXPORT_SYMBOL(truncate64); + #ifdef SUBARCH_i386 EXPORT_SYMBOL(vsyscall_ehdr); EXPORT_SYMBOL(vsyscall_end); -- cgit v1.2.3-70-g09d2 From 63b44442416a243f05881b0dd094b621a46ab4b3 Mon Sep 17 00:00:00 2001 From: Paolo 'Blaisorblade' Giarrusso Date: Thu, 29 Dec 2005 17:40:02 +0100 Subject: [PATCH] uml: fix compilation with CONFIG_MODE_TT disabled Fix UML compilation when SKAS mode is disabled. Indeed, we were compiling SKAS-only object files, which failed due to some SKAS-only headers being excluded from the search path. Thanks to the bug report from Pekka J Enberg. Acked-by: Pekka J Enberg Signed-off-by: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Linus Torvalds --- arch/um/sys-i386/Makefile | 8 +++++--- arch/um/sys-x86_64/Makefile | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/arch/um/sys-i386/Makefile b/arch/um/sys-i386/Makefile index 150059dbee1..f5fd5b0156d 100644 --- a/arch/um/sys-i386/Makefile +++ b/arch/um/sys-i386/Makefile @@ -1,6 +1,8 @@ -obj-y = bitops.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \ - ptrace_user.o semaphore.o signal.o sigcontext.o stub.o stub_segv.o \ - syscalls.o sysrq.o sys_call_table.o +obj-y := bitops.o bugs.o checksum.o delay.o fault.o ksyms.o ldt.o ptrace.o \ + ptrace_user.o semaphore.o signal.o sigcontext.o syscalls.o sysrq.o \ + sys_call_table.o + +obj-$(CONFIG_MODE_SKAS) += stub.o stub_segv.o obj-$(CONFIG_HIGHMEM) += highmem.o obj-$(CONFIG_MODULES) += module.o diff --git a/arch/um/sys-x86_64/Makefile b/arch/um/sys-x86_64/Makefile index 00b2025427d..a351091fbd9 100644 --- a/arch/um/sys-x86_64/Makefile +++ b/arch/um/sys-x86_64/Makefile @@ -6,8 +6,9 @@ #XXX: why into lib-y? lib-y = bitops.o bugs.o csum-partial.o delay.o fault.o ldt.o mem.o memcpy.o \ - ptrace.o ptrace_user.o sigcontext.o signal.o stub.o \ - stub_segv.o syscalls.o syscall_table.o sysrq.o thunk.o + ptrace.o ptrace_user.o sigcontext.o signal.o syscalls.o \ + syscall_table.o sysrq.o thunk.o +lib-$(CONFIG_MODE_SKAS) += stub.o stub_segv.o obj-y := ksyms.o obj-$(CONFIG_MODULES) += module.o um_module.o -- cgit v1.2.3-70-g09d2 From ee025949586f80effa634ff273c2444795472780 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Wed, 28 Dec 2005 20:01:04 -0500 Subject: [PATCH] fix ia64 compile failure with gcc4.1 __get_unaligned creates a typeof the var its passed, and writes to it, which on gcc4.1, spits out the following error: drivers/char/vc_screen.c: In function 'vcs_write': drivers/char/vc_screen.c:422: error: assignment of read-only variable 'val' Signed-off-by: Dave Jones [ The "right" fix would be to try to fix but that's hard to do with the tools gcc gives us. So this simpler patch is preferable -- Linus ] Signed-off-by: Linus Torvalds --- drivers/char/vc_screen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/vc_screen.c b/drivers/char/vc_screen.c index f66c7ad6fd3..3c1dafaa344 100644 --- a/drivers/char/vc_screen.c +++ b/drivers/char/vc_screen.c @@ -419,7 +419,7 @@ vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) while (this_round > 1) { unsigned short w; - w = get_unaligned(((const unsigned short *)con_buf0)); + w = get_unaligned(((unsigned short *)con_buf0)); vcs_scr_writew(vc, w, org++); con_buf0 += 2; this_round -= 2; -- cgit v1.2.3-70-g09d2 From f873e3e88d52774633968826c5b7fa7bf9697999 Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Wed, 28 Dec 2005 20:44:48 -0500 Subject: [PATCH] Input: aiptek - fix Y axis setup This patch fixes a typo introduced by conversion to dynamic input_dev allocation. Signed-off-by: Dmitry Torokhov Signed-off-by: Linus Torvalds --- drivers/usb/input/aiptek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/input/aiptek.c b/drivers/usb/input/aiptek.c index 1c3b472a3bc..0e2505c073d 100644 --- a/drivers/usb/input/aiptek.c +++ b/drivers/usb/input/aiptek.c @@ -2103,7 +2103,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id) * values. */ input_set_abs_params(inputdev, ABS_X, 0, 2999, 0, 0); - input_set_abs_params(inputdev, ABS_X, 0, 2249, 0, 0); + input_set_abs_params(inputdev, ABS_Y, 0, 2249, 0, 0); input_set_abs_params(inputdev, ABS_PRESSURE, 0, 511, 0, 0); input_set_abs_params(inputdev, ABS_TILT_X, AIPTEK_TILT_MIN, AIPTEK_TILT_MAX, 0, 0); input_set_abs_params(inputdev, ABS_TILT_Y, AIPTEK_TILT_MIN, AIPTEK_TILT_MAX, 0, 0); -- cgit v1.2.3-70-g09d2 From 576fc0978b6b3673fce6d4b405f36449e508826c Mon Sep 17 00:00:00 2001 From: Ravikiran G Thirumalai Date: Thu, 29 Dec 2005 13:06:11 +0100 Subject: [PATCH] x86_64: Fix incorrect node_present_pages on NUMA Currently, we do not pass the correct start_pfn to e820_hole_size, to calculate holes. Following patch fixes that. The bug results in incorrect number of node_present_pages for each pgdat and causes ugly output in /sys and probably VM inbalances. Signed-off-by: Alok N Kataria Signed-off-by: Ravikiran Thirumalai Signed-off-by: Andi Kleen Sighed-off-by: Shair Fultheim Sighed-off-by: Linus Torvalds --- arch/x86_64/mm/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86_64/mm/init.c b/arch/x86_64/mm/init.c index 286f6a624c3..c016dfe8478 100644 --- a/arch/x86_64/mm/init.c +++ b/arch/x86_64/mm/init.c @@ -348,7 +348,7 @@ size_zones(unsigned long *z, unsigned long *h, } /* Compute holes */ - w = 0; + w = start_pfn; for (i = 0; i < MAX_NR_ZONES; i++) { unsigned long s = w; w += z[i]; -- cgit v1.2.3-70-g09d2 From e597cb32e95a6c38e9ead981b169ef2974ccfec0 Mon Sep 17 00:00:00 2001 From: Anton Blanchard Date: Thu, 29 Dec 2005 10:46:29 +1100 Subject: [PATCH] ppc64: htab_initialize_secondary cannot be marked __init Sonny has noticed hotplug CPU on ppc64 is broken in 2.6.15-*. One of the problems is that htab_initialize_secondary is called when a cpu is being brought up, but it is marked __init. Signed-off-by: Anton Blanchard Acked-by: Paul Mackerras Signed-off-by: Linus Torvalds --- arch/powerpc/mm/hash_utils_64.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c index a33583f3b0e..a606504678b 100644 --- a/arch/powerpc/mm/hash_utils_64.c +++ b/arch/powerpc/mm/hash_utils_64.c @@ -514,7 +514,7 @@ void __init htab_initialize(void) #undef KB #undef MB -void __init htab_initialize_secondary(void) +void htab_initialize_secondary(void) { if (!platform_is_lpar()) mtspr(SPRN_SDR1, _SDR1); -- cgit v1.2.3-70-g09d2 From 80c72579f74fcfcd63e27c5e317091cb35bb1f12 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 28 Dec 2005 21:02:57 +0100 Subject: [PATCH] Fix recursive config dependency for SAA7134 Fix the cyclic dependency issue between CONFIG_SAA7134_ALSA and CONFIG_SAA7134_OSS (credits to Mauro Carvalho Chehab.) Signed-off-by: Jean Delvare Acked-by: Mauro Carvalho Chehab Signed-off-by: Linus Torvalds --- drivers/media/video/saa7134/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig index c0f604a6fe4..86e1bb391a4 100644 --- a/drivers/media/video/saa7134/Kconfig +++ b/drivers/media/video/saa7134/Kconfig @@ -14,7 +14,7 @@ config VIDEO_SAA7134 config VIDEO_SAA7134_ALSA tristate "Philips SAA7134 DMA audio support" - depends on VIDEO_SAA7134 && SOUND && SND && (!VIDEO_SAA7134_OSS || VIDEO_SAA7134_OSS = m) + depends on VIDEO_SAA7134 && SND select SND_PCM_OSS ---help--- This is a video4linux driver for direct (DMA) audio in @@ -25,7 +25,7 @@ config VIDEO_SAA7134_ALSA config VIDEO_SAA7134_OSS tristate "Philips SAA7134 DMA audio support (OSS, DEPRECATED)" - depends on VIDEO_SAA7134 && SOUND_PRIME && (!VIDEO_SAA7134_ALSA || VIDEO_SAA7134_ALSA = m) + depends on VIDEO_SAA7134 && SOUND_PRIME && (!VIDEO_SAA7134_ALSA || (VIDEO_SAA7134_ALSA=m && m)) ---help--- This is a video4linux driver for direct (DMA) audio in Philips SAA713x based TV cards using OSS -- cgit v1.2.3-70-g09d2 From 392c14beaca2ee85a98d0c6b453501be67423a20 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Thu, 29 Dec 2005 13:01:54 -0800 Subject: Revert radeon AGP aperture offset changes This reverts the series of commits 67dbb4ea33731415fe09c62149a34f472719ac1d 281ab031a8c9e5b593142eb4ec59a87faae8676a 47807ce381acc34a7ffee2b42e35e96c0f322e52 that changed the GART VM start offset. It fixed some machines, but seems to continually interact badly with some X versions. Quoth Ben Herrenschmidt: "So I think at this point, the best is that we keep the old bogus code that at least is consistent with the bug in the server. I'm working on a big patch to X that reworks the memory map stuff completely and fixes those issues on the server side, I'll do a DRM patch matching this X fix as well so that the memory map is only ever set in one place and with what I hope is a correct algorithm..." Signed-off-by: Linus Torvalds --- drivers/char/drm/radeon_cp.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/drivers/char/drm/radeon_cp.c b/drivers/char/drm/radeon_cp.c index b517ae51580..342302d4674 100644 --- a/drivers/char/drm/radeon_cp.c +++ b/drivers/char/drm/radeon_cp.c @@ -1312,8 +1312,6 @@ static void radeon_set_pcigart(drm_radeon_private_t * dev_priv, int on) static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) { drm_radeon_private_t *dev_priv = dev->dev_private; - unsigned int mem_size, aper_size; - DRM_DEBUG("\n"); dev_priv->is_pci = init->is_pci; @@ -1523,13 +1521,8 @@ static int radeon_do_init_cp(drm_device_t * dev, drm_radeon_init_t * init) + dev_priv->fb_location) >> 10)); dev_priv->gart_size = init->gart_size; - - mem_size = RADEON_READ(RADEON_CONFIG_MEMSIZE); - if (mem_size == 0) - mem_size = 0x800000; - aper_size = max(RADEON_READ(RADEON_CONFIG_APER_SIZE), mem_size); - - dev_priv->gart_vm_start = dev_priv->fb_location + aper_size; + dev_priv->gart_vm_start = dev_priv->fb_location + + RADEON_READ(RADEON_CONFIG_APER_SIZE); #if __OS_HAS_AGP if (!dev_priv->is_pci) -- cgit v1.2.3-70-g09d2 From 9e625ff8a37aefcc177b19614ffcffb5bc6eeea1 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Thu, 29 Dec 2005 22:07:30 +0100 Subject: [PATCH] Simplify the VIDEO_SAA7134_OSS Kconfig dependency line Thanks to Roman Zippel for the suggestion. Signed-off-by: Jean Delvare [ Short explanation: Kconfig uses ternary math: n/m/y, and !m is m ] Signed-off-by: Linus Torvalds --- drivers/media/video/saa7134/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/video/saa7134/Kconfig b/drivers/media/video/saa7134/Kconfig index 86e1bb391a4..8a5c3e71b37 100644 --- a/drivers/media/video/saa7134/Kconfig +++ b/drivers/media/video/saa7134/Kconfig @@ -25,7 +25,7 @@ config VIDEO_SAA7134_ALSA config VIDEO_SAA7134_OSS tristate "Philips SAA7134 DMA audio support (OSS, DEPRECATED)" - depends on VIDEO_SAA7134 && SOUND_PRIME && (!VIDEO_SAA7134_ALSA || (VIDEO_SAA7134_ALSA=m && m)) + depends on VIDEO_SAA7134 && SOUND_PRIME && !VIDEO_SAA7134_ALSA ---help--- This is a video4linux driver for direct (DMA) audio in Philips SAA713x based TV cards using OSS -- cgit v1.2.3-70-g09d2